Parts#

class Part#

A part of a vehicle. Obtained from Vehicle.Parts.

Note

A part keeps its object when the vehicle it belongs to changes, for example when a decoupler separates it. Throws an exception once the part no longer exists.

string Name { get; }#

The id of the part’s template.

Game Scenes:

All

string Title { get; }#

The name of the part, as shown in the game.

Game Scenes:

All

Vehicle Vehicle { get; }#

The vehicle the part belongs to.

Game Scenes:

All

Part Parent { get; }#

The part this part is attached to, or null for the root part.

Game Scenes:

All

IList<Part> Children { get; }#

The parts attached to this part.

Game Scenes:

All

int Sequence { get; }#

The number of the sequence that activates the part, or -1 if no sequence does.

Game Scenes:

All

double Mass { get; }#

The mass of the part, including its propellant, in kilograms.

Game Scenes:

All

double DryMass { get; }#

The mass of the part without its propellant, in kilograms.

Game Scenes:

All

IList<Resource> Resources { get; }#

The resources the part holds, one for each substance.

Game Scenes:

All

Tuple<double, double, double> Position (ReferenceFrame referenceFrame)#

The position of the part’s origin, in meters.

Parameters:
  • referenceFrame – The reference frame of the position.

Game Scenes:

All

Tuple<double, double, double, double> Rotation (ReferenceFrame referenceFrame)#

The rotation of the part’s axes, relative to the given frame.

Parameters:
  • referenceFrame – The reference frame of the rotation.

Game Scenes:

All

Engine Engine { get; }#

The part’s engine, or null if it has none.

Game Scenes:

All

RCS RCS { get; }#

The part’s RCS thrusters, or null if it has none.

Game Scenes:

All

Decoupler Decoupler { get; }#

The part’s decoupler, or null if it has none.

Game Scenes:

All

Parachute Parachute { get; }#

The part’s parachute, or null if it has none.

Game Scenes:

All

DockingPort DockingPort { get; }#

The part’s docking port, or null if it has none.

Game Scenes:

All

class Engine#

An engine. Obtained from Part.Engine.

Note

An active engine fires when the vehicle’s engines are on, at the vehicle’s throttle. See Control.EngineOn and Control.Throttle.

Part Part { get; }#

The part the engine is in.

Game Scenes:

All

bool Active { get; set; }#

Whether the engine is active, as when its sequence is activated. Setting it returns once the change has applied.

Game Scenes:

All

bool HasPropellant { get; }#

Whether the engine has propellant to burn.

Game Scenes:

All

double Thrust { get; }#

The thrust of the engine at its current throttle and the current atmospheric pressure, in Newtons. Zero when it is not firing.

Game Scenes:

All

double AvailableThrust { get; }#

The thrust of the engine at full throttle and the current atmospheric pressure, in Newtons. Zero when it is inactive or has no propellant.

Game Scenes:

All

double SpecificImpulse { get; }#

The specific impulse of the engine at the current atmospheric pressure, in seconds. Zero when it is inactive or has no propellant.

Game Scenes:

All

class RCS#

The RCS thrusters of a part. Obtained from Part.RCS.

Note

Active thrusters fire when the vehicle’s RCS is on. See Control.RCS.

Part Part { get; }#

The part the thrusters are in.

Game Scenes:

All

bool Active { get; set; }#

Whether the thrusters are active. Setting it returns once the change has applied.

Game Scenes:

All

class Decoupler#

A decoupler. Obtained from Part.Decoupler.

Part Part { get; }#

The part the decoupler is in.

Game Scenes:

All

bool Enabled { get; }#

Whether the decoupler can fire.

Game Scenes:

All

bool Decoupled { get; }#

Whether the decoupler has fired, or is attached to nothing.

Game Scenes:

All

void Decouple ()#

Fire the decoupler, separating the vehicle into two. Returns once it has fired. Throws an exception if the decoupler is disabled or Decoupler.Decoupled.

Game Scenes:

All

class Parachute#

A parachute. Obtained from Part.Parachute.

Part Part { get; }#

The part the parachute is in.

Game Scenes:

All

ParachuteState State { get; }#

The state of the parachute.

Game Scenes:

All

float Fill { get; }#

How far the canopy is open, from 0 to 1.

Game Scenes:

All

float DeployAltitude { get; }#

The height above the terrain at which an armed parachute deploys, in meters.

Game Scenes:

All

bool CanCut { get; }#

Whether the parachute can be cut away. Main parachutes cannot.

Game Scenes:

All

void Deploy ()#

Arm the parachute, so that it deploys at Parachute.DeployAltitude. Returns once it is armed. Throws an exception if it is not stowed.

Game Scenes:

All

void Cut ()#

Cut the parachute away. Returns once it is cut. Throws an exception if it cannot be cut. See Parachute.CanCut.

Game Scenes:

All

enum ParachuteState#

The state of a parachute. See Parachute.State.

Stowed#

Packed away.

Armed#

Waiting to deploy at Parachute.DeployAltitude.

LineStretch#

Leaving the pack.

Reefed#

Partly open, to limit the opening load.

Disreefing#

Opening from reefed to full.

Full#

Fully open.

Cut#

Cut away.

Ripped#

Torn by too much dynamic pressure.

SeveredLines#

Lost after its lines broke under too much load.

class DockingPort#

A docking port. Obtained from Part.DockingPort.

Part Part { get; }#

The part the docking port is in.

Game Scenes:

All

bool Docked { get; }#

Whether the port is docked.

Game Scenes:

All

Part DockedPart { get; }#

The part the port is docked to, or null if it is not docked.

Game Scenes:

All

void Undock ()#

Undock the port, separating the vehicle into two. Returns once it has undocked. Throws an exception if the port is not docked.

Game Scenes:

All

Note

Docking and undocking replace the vehicles involved. See Vehicle.