Custom Asteroids  1.9
A mod for Kerbal Space Program that lets users control where asteroids appear
Starstrider42.CustomAsteroids.CustomAsteroidRegistry Class Reference

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...
 

Detailed Description

A ScenarioModule that stores extra information about unloaded asteroids.

Much of this information is available for loaded asteroids through the CustomAsteroidData module.

Constructor & Destructor Documentation

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.

Member Function Documentation

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.

Parameters
nodeThe 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.

Parameters
nodeThe ConfigNode representing this ScenarioModule.

Property Documentation

CustomAsteroidRegistry Starstrider42.CustomAsteroids.CustomAsteroidRegistry.Instance
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.


The documentation for this class was generated from the following file: