C# Class SSTUTools.SSTUModularFuelTank

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

Protected Properties

Свойство Type Description
currentMainTankModule TankModelData
currentMountModule SSTUTools.SingleModelData
currentNoseModule SSTUTools.SingleModelData
initialized bool
mainTankModules SSTUTools.TankModelData[]
mountModules SSTUTools.SingleModelData[]
noseModules SSTUTools.SingleModelData[]

Méthodes publiques

Méthode Description
GetInfo ( ) : string

Cleans up the 'default' assignments from the prefab part (put here due to lack of multi-pass loading). Also adds a quick blurb to the right-click menu regarding possible additional part functionality.

GetModuleCost ( float defaultCost, ModifierStagingSituation sit ) : float

Return the adjusted cost for the part based on current tank setup

GetModuleCostChangeWhen ( ) : ModifierChangeWhen
GetModuleMass ( float defaultMass, ModifierStagingSituation sit ) : float
GetModuleMassChangeWhen ( ) : ModifierChangeWhen
OnDestroy ( ) : void

Overriden/defined in order to remove the on-editor-ship-modified event from the game-event callback queue

OnLoad ( ConfigNode node ) : void
OnStart ( StartState state ) : void
Start ( ) : void
mountTypeUpdated ( BaseField field, object obj ) : void
noseTypeUpdated ( BaseField field, object obj ) : void
onEditorVesselModified ( ShipConstruct ship ) : void

Event callback for when vessel is modified in the editor. Used to know when the gui-fields for this module have been updated.

onMountTextureUpdated ( BaseField field, object obj ) : void
onNoseTextureUpdated ( BaseField field, object obj ) : void
onTankTextureUpdated ( BaseField field, object obj ) : void
tankDiameterUpdated ( BaseField field, object obj ) : void
tankHeightScaleUpdated ( BaseField field, object obj ) : void
tankSetUpdated ( BaseField field, object obj ) : void
tankTypeUpdated ( BaseField field, object obj ) : void

Méthodes protégées

Méthode Description
getMountRootTransform ( bool recreate ) : Transform
getNoseRootTransform ( bool recreate ) : Transform
getTankRootTransform ( bool recreate ) : Transform
initialize ( ) : void
setMainTankModuleFromEditor ( String newMainTank, bool updateSymmetry ) : void
setMountModuleFromEditor ( String newMountType, bool updateSymmetry ) : void
setNoseModuleFromEditor ( String newNoseType, bool updateSymmetry ) : void
setTankSetFromEditor ( String newTankSet, bool updateSymmetry ) : void
updateAttachNodes ( bool userInput ) : void

Private Methods

Méthode Description
loadConfigData ( ) : void

Restores ModelData instances from config node data, and populates the 'currentModule' instances with the currently enabled modules.

restoreEditorFields ( ) : void

Restores the editor-only diameter and height-adjustment values;

restoreModels ( ) : void

Loads or builds the models for the currently selected modules.

selectMountEvent ( ) : void
selectNoseEvent ( ) : void
setMountTextureFromEditor ( String newSet, bool updateSymmetry ) : void
setNoseTextureFromEditor ( String newSet, bool updateSymmetry ) : void
setTankDiameterFromEditor ( float newDiameter, bool updateSymmetry ) : void
setTankScaleFromEditor ( float editorScaleValue, bool updateSymmetry ) : void
setTankTextureFromEditor ( String newSet, bool updateSymmetry ) : void
updateAvailableVariants ( ) : void
updateContainerVolume ( ) : void
updateEditorStats ( bool userInput ) : void
updateGuiState ( ) : void
updateModels ( ) : void
updateModuleStats ( ) : void

Updates the internal cached values for the modules based on the current tank settings for scale/volume/position; done separately from updating the actual models so that the values can be used without the models even being present

updateTankStats ( ) : void
updateTextureSet ( bool updateSymmetry ) : void
updateUIScaleControls ( ) : void

Method Details

GetInfo() public méthode

Cleans up the 'default' assignments from the prefab part (put here due to lack of multi-pass loading). Also adds a quick blurb to the right-click menu regarding possible additional part functionality.
public GetInfo ( ) : string
Résultat string

GetModuleCost() public méthode

Return the adjusted cost for the part based on current tank setup
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

OnDestroy() public méthode

Overriden/defined in order to remove the on-editor-ship-modified event from the game-event callback queue
public OnDestroy ( ) : void
Résultat void

OnLoad() public méthode

public OnLoad ( 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

getMountRootTransform() protected méthode

protected getMountRootTransform ( bool recreate ) : Transform
recreate bool
Résultat UnityEngine.Transform

getNoseRootTransform() protected méthode

protected getNoseRootTransform ( bool recreate ) : Transform
recreate bool
Résultat UnityEngine.Transform

getTankRootTransform() protected méthode

protected getTankRootTransform ( bool recreate ) : Transform
recreate bool
Résultat UnityEngine.Transform

initialize() protected méthode

protected initialize ( ) : void
Résultat void

mountTypeUpdated() public méthode

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

noseTypeUpdated() public méthode

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

onEditorVesselModified() public méthode

Event callback for when vessel is modified in the editor. Used to know when the gui-fields for this module have been updated.
public onEditorVesselModified ( ShipConstruct ship ) : void
ship ShipConstruct
Résultat void

onMountTextureUpdated() public méthode

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

onNoseTextureUpdated() public méthode

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

onTankTextureUpdated() public méthode

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

setMainTankModuleFromEditor() protected méthode

protected setMainTankModuleFromEditor ( String newMainTank, bool updateSymmetry ) : void
newMainTank String
updateSymmetry bool
Résultat void

setMountModuleFromEditor() protected méthode

protected setMountModuleFromEditor ( String newMountType, bool updateSymmetry ) : void
newMountType String
updateSymmetry bool
Résultat void

setNoseModuleFromEditor() protected méthode

protected setNoseModuleFromEditor ( String newNoseType, bool updateSymmetry ) : void
newNoseType String
updateSymmetry bool
Résultat void

setTankSetFromEditor() protected méthode

protected setTankSetFromEditor ( String newTankSet, bool updateSymmetry ) : void
newTankSet String
updateSymmetry bool
Résultat void

tankDiameterUpdated() public méthode

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

tankHeightScaleUpdated() public méthode

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

tankSetUpdated() public méthode

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

tankTypeUpdated() public méthode

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

updateAttachNodes() protected méthode

protected updateAttachNodes ( bool userInput ) : void
userInput bool
Résultat void

Property Details

currentMainTankModule protected_oe property

protected TankModelData,SSTUTools currentMainTankModule
Résultat TankModelData

currentMountModule protected_oe property

protected SingleModelData,SSTUTools currentMountModule
Résultat SSTUTools.SingleModelData

currentNoseModule protected_oe property

protected SingleModelData,SSTUTools currentNoseModule
Résultat SSTUTools.SingleModelData

initialized protected_oe property

protected bool initialized
Résultat bool

mainTankModules protected_oe property

protected TankModelData[],SSTUTools mainTankModules
Résultat SSTUTools.TankModelData[]

mountModules protected_oe property

protected SingleModelData[],SSTUTools mountModules
Résultat SSTUTools.SingleModelData[]

noseModules protected_oe property

protected SingleModelData[],SSTUTools noseModules
Résultat SSTUTools.SingleModelData[]