C# Class SSTUTools.SSTUModularEngineCluster

Inheritance: PartModule, IPartCostModifier, IPartMassModifier
Exibir arquivo Open project: shadowmage45/SSTULabs

Public Methods

Method 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

Method 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 method

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
return string

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

OnStart() public method

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

Start() public method

public Start ( ) : void
return void

onDiameterUpdated() public method

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

onHeightUpdated() public method

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

onLayoutUpdated() public method

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

onMountTextureUpdated() public method

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

onMountUpdated() public method

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

onSpacingUpdated() public method

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