Custom Asteroids
1.9
A mod for Kerbal Space Program that lets users control where asteroids appear
|
A ScenarioModule that stores extra information about unloaded asteroids. More...
Inherits ScenarioModule.
Public Member Functions | |
CustomAsteroidRegistry () | |
Constructor called by KSP environment More... | |
override void | OnSave (ConfigNode node) |
Called when the save game including the module is saved. More... | |
override void | OnLoad (ConfigNode node) |
Called when the module is either constructed or loaded as part of a save game. More... | |
Properties | |
static CustomAsteroidRegistry | Instance [get] |
Reference to a unique CustomAsteroidRegistry. More... | |
A ScenarioModule that stores extra information about unloaded asteroids.
Much of this information is available for loaded asteroids through the CustomAsteroidData module.
Starstrider42.CustomAsteroids.CustomAsteroidRegistry.CustomAsteroidRegistry | ( | ) |
Constructor called by KSP environment
This constructor enforces CustomAsteroidRegistry's pseudo-singleton relationship with Instance. KSP somehow clears Instance before creating a new scneario object on scene changes, but it's not clear how.
override void Starstrider42.CustomAsteroids.CustomAsteroidRegistry.OnLoad | ( | ConfigNode | node | ) |
Called when the module is either constructed or loaded as part of a save game.
After this method returns, the module will be initialized with any settings in node
.
node | The ConfigNode representing this ScenarioModule. |
override void Starstrider42.CustomAsteroids.CustomAsteroidRegistry.OnSave | ( | ConfigNode | node | ) |
Called when the save game including the module is saved.
node
is initialized with the persistent contents of this object.
node | The ConfigNode representing this ScenarioModule. |
|
staticget |
Reference to a unique CustomAsteroidRegistry.
The CustomAsteroidRegistry instance used by the current game scene.
The reference is not guaranteed to remain valid across scene changes.