Custom Asteroids  1.1.0
A mod for Kerbal Space Program that lets users control where asteroids appear
 All Classes Namespaces Files Functions Variables Enumerations Properties Pages
AsteroidManager Class Reference

Central class for controlling asteroid orbits. More...

Classes

class  BadPopulationException
 Exception indicating that a Population is in an invalid state. More...
 

Static Package Functions

static void editAsteroid (Vessel asteroid)
 Customizes an asteroid, based on the settings loaded to Custom Asteroids. More...
 
static Options getOptions ()
 Returns the current options used by Custom Asteroids. More...
 
static double spawnRate ()
 Provides rate at which asteroids should be created. More...
 

Static Private Member Functions

static AsteroidManager ()
 Loads all Custom Asteroids settings. More...
 

Static Private Attributes

static PopulationLoader allowedPops
 Singleton object responsible for handling Custom Asteroids configurations.
 
static Options curOptions
 Singleton object responsible for handling Custom Asteroids options.
 

Detailed Description

Central class for controlling asteroid orbits.

Constructor & Destructor Documentation

static AsteroidManager ( )
staticprivate

Loads all Custom Asteroids settings.

Exception Safety
The object is in a consistent state in the event of an exception

Member Function Documentation

static void editAsteroid ( Vessel  asteroid)
staticpackage

Customizes an asteroid, based on the settings loaded to Custom Asteroids.

Parameters
[in,out]asteroidThe asteroid to be modified
Precondition
asteroid is a valid asteroid object in the game
asteroid has never been loaded in physics range
Postcondition
asteroid has properties consistent with membership in a randomly chosen population
Exceptions
System.InvalidOperationExceptionThrown if there are no populations in which to place the asteroid
AsteroidManager.BadPopulationExceptionThrown if a population exists, but cannot generate valid data
Exception Safety
The program is in a consistent state in the event of an exception
static Options getOptions ( )
staticpackage

Returns the current options used by Custom Asteroids.

Returns
An Options objects with the settings to use
Exception Safety
Does not throw exceptions
static double spawnRate ( )
staticpackage

Provides rate at which asteroids should be created.

Returns
The total spawn rate of all loaded Populations
Exception Safety
Does not throw exceptions.

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