C# Class SSTUTools.SSTUModularEngineCluster

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

Méthodes publiques

Méthode Description
GetInfo ( ) : string

Overriden to provide an opportunity to remove any existing models from the prefab part, so they do not get cloned into live parts as for some reason they cause issues when cloned in that fashion.

GetModuleCost ( float defaultCost, ModifierStagingSituation sit ) : float
GetModuleCostChangeWhen ( ) : ModifierChangeWhen
GetModuleMass ( float defaultMass, ModifierStagingSituation sit ) : float
GetModuleMassChangeWhen ( ) : ModifierChangeWhen
OnLoad ( ConfigNode node ) : void
OnStart ( PartModule state ) : void
Start ( ) : void
onDiameterUpdated ( BaseField field, object obj ) : void
onHeightUpdated ( BaseField field, object obj ) : void
onLayoutUpdated ( BaseField field, object obj ) : void
onMountTextureUpdated ( BaseField field, object obj ) : void
onMountUpdated ( BaseField field, object obj ) : void
onSpacingUpdated ( BaseField field, object obj ) : void

Private Methods

Méthode Description
clearMountEvent ( ) : void
getCurrentMountScale ( ) : float

Returns the current mount scale; calculated by the current user-set size and the default size specified in definition file

getSplitThrustNode ( float originalValues, int positions ) : ConfigNode

Return a config node representing the 'split thrust transform' setup for this engine given the original input thrust-split setup and the number of engines currently in the part/model.

initialize ( ) : void
initializePrefab ( ConfigNode node ) : void
initializeSmokeTransform ( ) : void
loadConfigNodeData ( ConfigNode node ) : void
loadEngineLayouts ( ConfigNode moduleLayoutNodes ) : void
positionEngineModels ( ) : void

Updates the engine model positions and rotations for the current layout positioning with the given mount vertical offset, engine vertical offset, and user-specified vertical offset

positionMountModel ( ) : void

Position the mount model according to its current scale and model position/offset parameters. Sets model scale according to the local cached 'currentMountScale' field value, but does not calculate that value (it is determined by mount config)

reInitEngineModule ( ) : void

Re-initializes the engine and gimbal modules from their original config nodes -- this should -hopefully- allow them to grab updated transforms and update FX stuff properly

removeStockTransforms ( ) : void

Removes the named transforms from the model hierarchy. Removes the entire branch of the tree starting at the named transform. This is intended to be used to remove stock ModuleJettison engine fairing transforms, but may have other use cases as well. Should function as intended for any model transforms.

selectMountEvent ( ) : void
setMountTextureFromEditor ( String newSet, bool updateSymmetry ) : void
setupEngineModels ( ) : void

Removes existing engine models and create new models, but does not position or scale them

setupMountModel ( ) : void

Sets up the actual models for the mount(s), but does not position or scale the models

setupSplitThrustCache ( ModuleEngines engines ) : void
setupThrustCache ( ModuleEngines engines ) : void
updateDragCubes ( ) : void
updateEditorFields ( ) : void

Restores the editor-adjustment values from the current/persistent tank size data Should only be called when a new mount is selected, or the part is fist initialized in the editor

updateEngineOffsetFromEditor ( float newOffset, bool updateSymmetry ) : void
updateEngineSpacingFromEditor ( float newSpacing, bool updateSymmetry ) : void
updateFairing ( bool userInput ) : void

Updates the position and enable/disable status of the SSTUNodeFairing (if present).

updateGuiState ( ) : void

Updates the context-menu GUI buttons/etc as the config of the part changes.

updateLayoutFromEditor ( String newLayout, bool updateSymmetry ) : void
updateLayoutOptionsGuiControl ( bool forceUpdate ) : void
updateMountFromEditor ( String newMount, bool updateSymmetry ) : void
updateMountOptionsGuiControl ( ) : void
updateMountSizeFromEditor ( float newSize, bool updateSymmetry ) : void
updateMountSizeGuiControl ( bool forceUpdate, float forceVal ) : void
updateMountTexture ( ) : void
updateMountTextureOptionsGuiControl ( ) : void
updateNodePositions ( bool userInput ) : void

Updates attach node position based on the current mount/parameters

updatePartCostAndMass ( ) : void

Method Details

GetInfo() public méthode

Overriden to provide an opportunity to remove any existing models from the prefab part, so they do not get cloned into live parts as for some reason they cause issues when cloned in that fashion.
public GetInfo ( ) : string
Résultat string

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

OnStart() public méthode

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

Start() public méthode

public Start ( ) : void
Résultat void

onDiameterUpdated() public méthode

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

onHeightUpdated() public méthode

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

onLayoutUpdated() public méthode

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

onMountTextureUpdated() public méthode

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

onMountUpdated() public méthode

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

onSpacingUpdated() public méthode

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