C# Class SSTUTools.SSTUVolumeContainer

Inheritance: PartModule, IPartCostModifier, IPartMassModifier
Mostra file Open project: shadowmage45/SSTULabs Class Usage Examples

Public Methods

Method 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
addPresetRatios ( ContainerDefinition container, ContainerFuelPreset preset, bool updateSymmetry ) : void
closeGUI ( ) : void
containerTypeUpdated ( ContainerDefinition container, ContainerModifier newType, bool updateSymmetry = false ) : void
highestVolumeContainer ( string resourceName ) : ContainerDefinition
onFuelTypeUpdated ( BaseField field, object obj ) : void
onVolumeUpdated ( float newVolume ) : void
setContainerPercents ( float percents, float totalVolume ) : void
setFuelPreset ( ContainerDefinition container, ContainerFuelPreset preset, bool updateSymmetry ) : void
setResourceFillPercent ( ContainerDefinition def, string resourceName, float newPercent, bool updateSymmetry = false ) : void
setResourceRatio ( ContainerDefinition def, string resourceName, int newRatio, bool updateSymmetry = false ) : void
subtractPresetRatios ( ContainerDefinition container, ContainerFuelPreset preset, bool updateSymmetry ) : void

Private Methods

Method Description
OnGUI ( ) : void
getBaseContainer ( ) : ContainerDefinition
getContainer ( string name ) : ContainerDefinition
loadConfigData ( ) : void
openGUI ( ) : void
openGUIEvent ( ) : void
setSingleFuelType ( string presetName, bool updateSymmetry ) : void
updateContainerVolumes ( ) : void

Update sub-containers volume data for the current total part volume

updateFuelSelections ( ) : void

Update the available GUI fuel type selection values for the current container setup

updateKISVolume ( ) : void
updateMassAndCost ( ) : void

Update cached mass and cost values from container calculated data

updatePartStats ( ) : void

Update part impact tolerance and max temp stats based on first containers modifier values and part prefab values

updatePersistentData ( ) : void
updateTankResources ( ) : void

Update the resources for the part from the resources in the currently configured containers

Method Details

GetModuleCost() public method

public GetModuleCost ( float defaultCost, ModifierStagingSituation sit ) : float
defaultCost float
sit ModifierStagingSituation
return float

GetModuleCostChangeWhen() public method

public GetModuleCostChangeWhen ( ) : ModifierChangeWhen
return ModifierChangeWhen

GetModuleMass() public method

public GetModuleMass ( float defaultMass, ModifierStagingSituation sit ) : float
defaultMass float
sit ModifierStagingSituation
return float

GetModuleMassChangeWhen() public method

public GetModuleMassChangeWhen ( ) : ModifierChangeWhen
return ModifierChangeWhen

OnLoad() public method

public OnLoad ( ConfigNode node ) : void
node System.ConfigNode
return void

OnSave() public method

public OnSave ( ConfigNode node ) : void
node System.ConfigNode
return void

OnStart() public method

public OnStart ( StartState state ) : void
state StartState
return void

Start() public method

public Start ( ) : void
return void

addPresetRatios() public method

public addPresetRatios ( ContainerDefinition container, ContainerFuelPreset preset, bool updateSymmetry ) : void
container ContainerDefinition
preset ContainerFuelPreset
updateSymmetry bool
return void

closeGUI() public method

public closeGUI ( ) : void
return void

containerTypeUpdated() public method

public containerTypeUpdated ( ContainerDefinition container, ContainerModifier newType, bool updateSymmetry = false ) : void
container ContainerDefinition
newType ContainerModifier
updateSymmetry bool
return void

highestVolumeContainer() public method

public highestVolumeContainer ( string resourceName ) : ContainerDefinition
resourceName string
return ContainerDefinition

onFuelTypeUpdated() public method

public onFuelTypeUpdated ( BaseField field, object obj ) : void
field BaseField
obj object
return void

onVolumeUpdated() public method

public onVolumeUpdated ( float newVolume ) : void
newVolume float
return void

setContainerPercents() public method

public setContainerPercents ( float percents, float totalVolume ) : void
percents float
totalVolume float
return void

setFuelPreset() public method

public setFuelPreset ( ContainerDefinition container, ContainerFuelPreset preset, bool updateSymmetry ) : void
container ContainerDefinition
preset ContainerFuelPreset
updateSymmetry bool
return void

setResourceFillPercent() public method

public setResourceFillPercent ( ContainerDefinition def, string resourceName, float newPercent, bool updateSymmetry = false ) : void
def ContainerDefinition
resourceName string
newPercent float
updateSymmetry bool
return void

setResourceRatio() public method

public setResourceRatio ( ContainerDefinition def, string resourceName, int newRatio, bool updateSymmetry = false ) : void
def ContainerDefinition
resourceName string
newRatio int
updateSymmetry bool
return void

subtractPresetRatios() public method

public subtractPresetRatios ( ContainerDefinition container, ContainerFuelPreset preset, bool updateSymmetry ) : void
container ContainerDefinition
preset ContainerFuelPreset
updateSymmetry bool
return void