C# Class SSTUTools.SSTUModularBooster

Inheritance: PartModule
Mostrar archivo 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
OnDestroy ( ) : void
OnGUI ( ) : void
OnLoad ( ConfigNode node ) : void
OnSave ( ConfigNode node ) : void
OnStart ( StartState state ) : void
Start ( ) : void
closeGui ( FloatCurve editorCurve, string preset ) : void
onBodyUpdated ( BaseField field, object obj ) : void
onDiameterUpdated ( BaseField field, object obj ) : void
onEditorShipModified ( ShipConstruct ship ) : void
onGimbalUpdated ( BaseField field, object obj ) : void
onMainTextureUpdated ( BaseField field, object obj ) : void
onNoseTextureUpdated ( BaseField field, object obj ) : void
onNoseUpdated ( BaseField field, object obj ) : void
onNozzleTextureUpdated ( BaseField field, object obj ) : void
onNozzleUpdated ( BaseField field, object obj ) : void

Private Methods

Method Description
editThrustCurveEvent ( ) : void
initiaizePrefab ( ) : void

Initializes thrust transforms for the part; should only be called during prefab init. Transforms will then be cloned into live model as-is.

initialize ( ) : void

Initializes all modules and variables for this PartModule

loadConfigNodeData ( ) : void

Loads the current configuration from the cached persistent config node data

resetTransformParents ( ) : void

Utility method to -temporarily- reset the parent of the thrust transform to the parts base model transform.

This should be used before deleting a nozzle/mount model to keep the same thrust transform object in use, and the transforms should subsequently be re-parented to thier proper hierarchy after the new/updated model/module is initialized.

selectNoseEvent ( ) : void
updateAttachnodes ( bool userInput ) : void

Update attach node positions and optionally update the parts attached to those nodes if userInput==true

updateContainerVolume ( ) : void

Update the volume of resources that are available in the part, based on the currently selected models and scales

updateCurvePersistentData ( ) : void

Update the persistent representation of the custom thrust curve for this engine and store it as a string so it will be serialized into the part/craft persistence file

updateDiameterFromEditor ( float newDiameter, bool updateSymmetry ) : void

Updates the current model scales from user input in the editor

updateEditorValues ( ) : void

Update the editor values for whole and partial increments based on the current setup parameters. Ensures that pressing the ++/-- buttom with a parital increment selected will carry that increment over or zero it out if is out of bounds. Also allows for non-whole increments to be used for min and max values for the adjusted parameters

updateEffectsScale ( ) : void
updateEngineGuiStats ( ) : void
updateEngineISP ( ) : void

Update the engine ISP based on the currently selected nozzle mode (atmo or vacuum specialized)

updateGimbalOffset ( ) : void

Updates the current gimbal transform angle and the gimbal modules range values to the values for the current nozzle module

updateGimbalOffsetFromEditor ( float newOffset, bool updateSymmetry ) : void
updateGui ( ) : void

Updates GUI fields for diameter/height/etc

updateMainModelFromEditor ( String newModel, bool updateSymmetry ) : void

Updates the main-segment model from user input in the editor

updateMainTextureFromEditor ( String newTex, bool updateSymmetry ) : void
updateModelScaleAndPosition ( ) : void

Updates the rendering scale and position for the currently enabled modules

updateMountFromEditor ( String newMount, bool updateSymmetry ) : void

Updates the mount module from user input in the editor

updateNoseFromEditor ( String newNose, bool updateSymmetry ) : void

Update the nose module from user input in the editor

updateNoseTextureFromEditor ( String newTex, bool updateSymmetry ) : void
updateNozzleTextureFromEditor ( String newTex, bool updateSymmetry ) : void
updatePartCost ( ) : void
updatePartMass ( ) : void

Update the mass of the part (and real-fuels/MFT volume) based on the currently selected models and scales

updateTextureSets ( ) : void
updateThrustOutput ( ) : void

Update the engines min and max thrust values based on the currently selected main tank segment

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

OnDestroy() public method

public OnDestroy ( ) : void
return void

OnGUI() public method

public OnGUI ( ) : void
return void

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

closeGui() public method

public closeGui ( FloatCurve editorCurve, string preset ) : void
editorCurve FloatCurve
preset string
return void

onBodyUpdated() public method

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

onDiameterUpdated() public method

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

onEditorShipModified() public method

public onEditorShipModified ( ShipConstruct ship ) : void
ship ShipConstruct
return void

onGimbalUpdated() public method

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

onMainTextureUpdated() public method

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

onNoseTextureUpdated() public method

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

onNoseUpdated() public method

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

onNozzleTextureUpdated() public method

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

onNozzleUpdated() public method

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