Derived: Engine, Sensor, LinkPart
Part of the ship (vehicle/vessel).
Instance Properties:
native
: Part - [Unsafe
] KSP APItype
: PartType - [WIP
] Type of the part.science
: PartScience - Science available through this part,null
if none.ship
: Ship - Ship (vehicle/vessel) this part belongs to.parent
: Part - Parent part (this part is attached to).children
: PartChildren - Parts attached to this part.values
: PartValues - Custom values and tags attached to this part.tags
: PartValues - Custom values and tags attached to this part. (alias tovalues
)decoupler
: LinkPart - Decoupler that will decouple this part when staged.stage
: int - Stage number as provided by KSP API. (native.inverseStage
- activating stage for engines, decouplers etc.)decoupledin
: int - Stage number where this part will be decoupled or -1. (decoupler?.stage ?? -1
)resources
: ResourceList - Resources contained within this part.state
: PartStates - State of the part (IDLE, ACTIVE (e.g. engine), DEACTIVATED, DEAD, FAILED).name
: string - Name of the part (assigned by KSP).title
: string - Title of the part (assigned by KSP).position
: Vector - Position of the part (relative to CoM of active ship/vessel).mass
: double - Mass of the part including resources.resourceMass
: double - Mass of the resources contained.
Instance Methods:
istype()
: bool, name string- Method to test the type of the part (e.g.
.istype("LaunchClamp")
). Note that ROS hasis
operator and Lua hasisa
function that can be used togehter withtypes.engine
etc. Another classification is throughtype
property.
- Method to test the type of the part (e.g.
explode()
: void - Explode the part.