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

An entry in the asteroid registry. More...

Public Member Functions

 AsteroidInfo (ConfigNode vessel, string parentSet)
 Summarize key information for a newly created asteroid. More...
 
 AsteroidInfo (ProtoVessel vessel, string parentSet)
 Summarize key information for a newly created asteroid. More...
 
 AsteroidInfo (Vessel vessel, string parentSet)
 Summarize key information for a newly created asteroid. More...
 
ConfigNode ToConfigNode ()
 Create a ConfigNode representing this object. More...
 

Static Public Member Functions

static AsteroidInfo FromConfigNode (ConfigNode node)
 Restore an AsteroidInfo from its persisted form. More...
 

Public Attributes

uint id
 Persistent ID for the asteroid vessel. More...
 
string parentSet
 The asteroid set from which this asteroid came. More...
 

Detailed Description

An entry in the asteroid registry.

Constructor & Destructor Documentation

Starstrider42.CustomAsteroids.AsteroidInfo.AsteroidInfo ( ConfigNode  vessel,
string  parentSet 
)

Summarize key information for a newly created asteroid.

Parameters
vesselThe asteroid whose information needs to be stored.
parentSetThe asteroid set from which the asteroid was created.
Exceptions
System.ArgumentExceptionThrown if vessel is missing its unique identifier.
Starstrider42.CustomAsteroids.AsteroidInfo.AsteroidInfo ( ProtoVessel  vessel,
string  parentSet 
)

Summarize key information for a newly created asteroid.

Parameters
vesselThe asteroid whose information needs to be stored.
parentSetThe asteroid set from which the asteroid was created.
Starstrider42.CustomAsteroids.AsteroidInfo.AsteroidInfo ( Vessel  vessel,
string  parentSet 
)

Summarize key information for a newly created asteroid.

Parameters
vesselThe asteroid whose information needs to be stored.
parentSetThe asteroid set from which the asteroid was created.

Member Function Documentation

static AsteroidInfo Starstrider42.CustomAsteroids.AsteroidInfo.FromConfigNode ( ConfigNode  node)
static

Restore an AsteroidInfo from its persisted form.

Parameters
nodeThe ConfigNode representing this object.
ConfigNode Starstrider42.CustomAsteroids.AsteroidInfo.ToConfigNode ( )

Create a ConfigNode representing this object.

Member Data Documentation

uint Starstrider42.CustomAsteroids.AsteroidInfo.id

Persistent ID for the asteroid vessel.

string Starstrider42.CustomAsteroids.AsteroidInfo.parentSet

The asteroid set from which this asteroid came.

May be null if the set is unknown or inapplicable (e.g., stock asteroids).


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