A PartModule that can be configured to behave like many different kinds of engines. All stock propulsion systems except for RCS are implemented through ModuleEngines.
More...
|
class | Propellant |
| A class that represents the resource requirements of an engine. More...
|
|
A PartModule that can be configured to behave like many different kinds of engines. All stock propulsion systems except for RCS are implemented through ModuleEngines.
ModuleEngines.ModuleEngines |
( |
| ) |
|
void ModuleEngines.AutoPlaceFXGroup |
( |
FXGroup |
group, |
|
|
Transform |
thruster |
|
) |
| |
void ModuleEngines.BurstFlameoutGroups |
( |
| ) |
|
float ModuleEngines.CalculateThrust |
( |
| ) |
|
void ModuleEngines.EngineExhaustDamage |
( |
| ) |
|
void ModuleEngines.FixedUpdate |
( |
| ) |
|
override string ModuleEngines.GetInfo |
( |
| ) |
|
|
virtual |
The return value of this function appears in the part's description in the editor.
- Returns
- Editor info for the part
Reimplemented from PartModule.
override void ModuleEngines.OnActive |
( |
| ) |
|
|
virtual |
This function is called once when the part gets activated.
Reimplemented from PartModule.
override void ModuleEngines.OnAwake |
( |
| ) |
|
|
virtual |
This function gets called only once, during the KSP loading screen. See the Unity documentation on Awake for more information.
Reimplemented from PartModule.
void ModuleEngines.OnCenterOfThrustQuery |
( |
CenterOfThrustQuery |
qry | ) |
|
override void ModuleEngines.OnLoad |
( |
ConfigNode |
node | ) |
|
|
virtual |
This function is called to initialize the part. The ConfigNode contains the parameters of the module as specified in the part.cfg file, or as you last saved them in OnSave.
- Parameters
-
node | A ConfigNode containing the module's parameters from part.cfg or persistent.sfs |
Reimplemented from PartModule.
override void ModuleEngines.OnSave |
( |
ConfigNode |
node | ) |
|
|
virtual |
This function is called when the game is saved to let the part save persistent data. Add any data you want to persist to the ConfigNode. The ConfigNode will then be saved as part of persistent.sfs. When the game is resumed, you can then read this data back out in OnLoad.
- Parameters
-
Reimplemented from PartModule.
Called when the flight starts, or when the part is created in the editor. OnStart will be called before OnUpdate or OnFixedUpdate are ever called.
- Parameters
-
state | Some information about what situation the vessel is starting in. |
Reimplemented from PartModule.
double ModuleEngines.RequestPropellant |
( |
double |
mass | ) |
|
void ModuleEngines.SetPowerGroupsActive |
( |
bool |
active | ) |
|
void ModuleEngines.SetRunningGroupsActive |
( |
bool |
active | ) |
|
void ModuleEngines.SetupFXGroups |
( |
| ) |
|
void ModuleEngines.SetupPropellant |
( |
| ) |
|
void ModuleEngines.UpdateThrottle |
( |
| ) |
|
bool ModuleEngines.allowRestart |
bool ModuleEngines.allowShutdown |
Represents the specific impulse (Isp) of the engine as a function of altitude. To get the Isp at a certain height h (in meters), use
atmosphereCurve.Evaluate(h)
.
bool ModuleEngines.autoPositionFX |
float ModuleEngines.currentThrottle |
The current internal throttle of the engine, which may be different from the current throttle set by the player if useEngineResponseTime
is true.
float ModuleEngines.engineAccelerationSpeed |
How quickly the engine spools up when the user-set throttle is higher than currentThrottle
.
Each frame, if the user throttle is higher than the engine's currentThrottle
, currentThrottle
is updated according to the formula
engineAccelerationSpeed
has units of inverse seconds.
float ModuleEngines.engineDecelerationSpeed |
How quickly the engine spools down when the user-set throttle is higher than currentThrottle
.
Each frame, if the user throttle is lower than the engine's currentThrottle
, currentThrottle
is updated according to the formula
engineDecelerationSpeed
has units of inverse seconds.
bool ModuleEngines.EngineIgnited |
Whether the engine has ever been turned on?
bool ModuleEngines.engineShutdown |
bool ModuleEngines.exhaustDamage |
Whether the engine's exhaust will damage parts that it hits. A ray is cast back along the engine's thrust vector and if that ray hits a part then that part gets heated up, and may explode if it exceeds its maximum temperature.
float ModuleEngines.finalThrust |
bool ModuleEngines.flameout |
float ModuleEngines.fuelFlowGui |
string ModuleEngines.fxGroupPrefix |
Vector3 ModuleEngines.fxOffset |
float ModuleEngines.heatProduction |
float ModuleEngines.ignitionThreshold |
float ModuleEngines.maxThrust |
The thrust this engine produces at maximum throttle.
float ModuleEngines.minThrust |
The thrust this engine produces at minimum throttle.
float ModuleEngines.mixtureDensity |
The resources used by this engine, and their relative ratios.
float ModuleEngines.realIsp |
The current specific impulse of this engine, in seconds.
float ModuleEngines.requestedThrottle |
float ModuleEngines.requestedThrust |
bool ModuleEngines.staged |
string ModuleEngines.status |
string ModuleEngines.statusL2 |
bool ModuleEngines.throttleLocked |
Whether this engine always produces maximum thrust once activated (like solid rocket boosters).
List<Transform> ModuleEngines.thrustTransforms |
These transforms store the locations and directions at which the thrust this engine generates is applied to the part. Which component of the transform rotation gives the thrust vector?
string ModuleEngines.thrustVectorTransformName |
bool ModuleEngines.useEngineResponseTime |
Whether the engine has a nonzero spool-up and spool-down time.
If useEngineResponseTime
is true, then the engine does not spool up or down instantly when the throttle changes, but uses the engineAccelerationSpeed
and engineDecelerationSpeed
variables.
bool ModuleEngines.useVelocityCurve |
Whether this engine's thrust varies with airspeed?
How this engine's thrust varies with airspeed?
bool ModuleEngines.getFlameoutState |
|
get |
If this is true, the engine is not producing thrust because it can't get enough resources.
bool ModuleEngines.getIgnitionState |
|
get |
float ModuleEngines.normalizedThrustOutput |
|
get |
The documentation for this class was generated from the following file: