Stores raw asteroid data.
More...
|
static void | printNode (ConfigNode node) |
| Debug function for traversing node tree. More...
|
|
Stores raw asteroid data.
- Invariant
- At most one instance of this class exists
- Todo:
- Clean up this class
Creates an empty solar system.
- Postcondition
- No asteroids will be created
- Exception Safety
- Does not throw exceptions.
Returns the name used for asteroids on stock orbits.
- Returns
- The name with which to replace "Ast."
- Exception Safety
- Does not throw exceptions
Randomly selects an asteroid population.
The selection is weighted by the spawn rate of each population; a population with a rate of 2.0 is twice as likely to be chosen as one with a rate of 1.0.
- Returns
- A reference to the selected population
- Exceptions
-
System.InvalidOperationException | Thrown if there are no populations from which to choose, or if all spawn rates are zero, or if any rate is negative |
- Exception Safety
- Does not throw exceptions
Returns the total spawn rate of all asteroid populations.
- Returns
- The sum of all spawn rates for all populations.
- Exception Safety
- Does not throw exceptions
Factory method obtaining Custom Asteroids settings from a config file.
- Returns
- A newly constructed PopulationLoader object containing a full list of all valid asteroid groups in asteroid config files
- Exceptions
-
System.TypeInitializationException | Thrown if the PopulationLoader object could not be constructed |
- Exception Safety
- The program is in a consistent state in the event of an exception
- Todo:
- Can I make Load() atomic?
static void printNode |
( |
ConfigNode |
node | ) |
|
|
staticprivate |
Debug function for traversing node tree.
- Parameters
-
[in] | node | The top-level node of the tree to be printed |
- Postcondition
- The current node and all nodes beneath it are printed, in depth-first order
The set of loaded asteroid Population objects.
- Note
- Initialized via ConfigNode
Settings related to stock-like asteroids.
- Note
- Initialized via ConfigNode
The documentation for this class was generated from the following file: