C# Class SSTUTools.SSTUModelSwitch

Inheritance: PartModule, IPartMassModifier, IPartCostModifier
Afficher le fichier Open project: shadowmage45/SSTULabs Class Usage Examples

Méthodes publiques

Méthode Description
GetModuleCost ( float defaultCost, ModifierStagingSituation sit ) : float
GetModuleCostChangeWhen ( ) : ModifierChangeWhen
GetModuleMass ( float defaultMass, ModifierStagingSituation sit ) : float
GetModuleMassChangeWhen ( ) : ModifierChangeWhen
OnLoad ( ConfigNode node ) : void
OnSave ( ConfigNode node ) : void
OnStart ( StartState state ) : void
Start ( ) : void
findGroup ( string name ) : ModelSwitchGroup

Locate the modelSwitchGroup for the input name -- UNSAFE - will KNFE for invalid name

onGroupUpdated ( BaseField field, object obj ) : void
onModelUpdated ( BaseField field, object obj ) : void

Private Methods

Méthode Description
calcTotalVolume ( ) : float

Calculates the total allocated volume for ALL VolumeContianer sub-containers This is calculated as -liters-

calcVolume ( int containerIndex ) : float

Calculates the total allocated volume for a specific container index. This is calculated as -liters-

initialize ( ) : void

Initialize this module - load config data, restore persistent data, setup gui fields

updateAttachNodes ( bool userInput ) : void
updateAttachNodesForModel ( ModelSwitchData modelData ) : void
updateContainerVolume ( ) : void

Updates the associated VolumeContainer with any changes to part volume from this module

updateDragCube ( ) : void
updateGui ( ) : void

Update the currently avaialble selection options and enabled/disabled status of the group and model selection widgets

updateMassAndCost ( ) : void

Update the cached mass and cost for the -models- that are currently enabled; resources and tankage are handled by VolumeContainer

updatePersistentData ( ) : void

Update the persistent data field with the current configuration for this module; this is a set of enabled/disabled flags for each groups models

Method Details

GetModuleCost() public méthode

public GetModuleCost ( float defaultCost, ModifierStagingSituation sit ) : float
defaultCost float
sit ModifierStagingSituation
Résultat float

GetModuleCostChangeWhen() public méthode

public GetModuleCostChangeWhen ( ) : ModifierChangeWhen
Résultat ModifierChangeWhen

GetModuleMass() public méthode

public GetModuleMass ( float defaultMass, ModifierStagingSituation sit ) : float
defaultMass float
sit ModifierStagingSituation
Résultat float

GetModuleMassChangeWhen() public méthode

public GetModuleMassChangeWhen ( ) : ModifierChangeWhen
Résultat ModifierChangeWhen

OnLoad() public méthode

public OnLoad ( ConfigNode node ) : void
node System.ConfigNode
Résultat void

OnSave() public méthode

public OnSave ( ConfigNode node ) : void
node System.ConfigNode
Résultat void

OnStart() public méthode

public OnStart ( StartState state ) : void
state StartState
Résultat void

Start() public méthode

public Start ( ) : void
Résultat void

findGroup() public méthode

Locate the modelSwitchGroup for the input name -- UNSAFE - will KNFE for invalid name
public findGroup ( string name ) : ModelSwitchGroup
name string
Résultat ModelSwitchGroup

onGroupUpdated() public méthode

public onGroupUpdated ( BaseField field, object obj ) : void
field BaseField
obj object
Résultat void

onModelUpdated() public méthode

public onModelUpdated ( BaseField field, object obj ) : void
field BaseField
obj object
Résultat void