KSP API
|
Each part on a vessel is represented by a Part object. Plugins can add new functionality to parts by defining new PartModules, which can then be added to Parts. It is also possible to define new subclasses of Part, but this is deprecated in favor of PartModules. More...
Public Types | |
enum | DragModel { DragModel.DEFAULT = 0, DragModel.CONIC = 1, DragModel.CYLINDRICAL = 2, DragModel.SPHERICAL = 3, DragModel.CUBE = 4, DragModel.NONE = 5 } |
enum | HighlightType { HighlightType.Disabled = 0, HighlightType.OnMouseOver = 1, HighlightType.AlwaysOn = 2 } |
enum | PhysicalSignificance { PhysicalSignificance.FULL = 0, PhysicalSignificance.NONE = 1 } |
Represents whether a part has physics. More... | |
Public Member Functions | |
Part () | |
bool | activate (int currentStage, Vessel activeVessel) |
void | AddAttachNode (ConfigNode node) |
void | addChild (Part child) |
bool | AddCrewmember (ProtoCrewMember crew) |
bool | AddCrewmemberAt (ProtoCrewMember crew, int seatIndex) |
void | AddExposedThermalFlux (double kilowatts) |
InternalModel | AddInternalPart (ConfigNode node) |
PartModule | AddModule (ConfigNode node) |
PartModule | AddModule (string moduleName) |
Add a PartModule to this part. PartModules that are dynamically added to parts and don't exist in the original part.cfg will not be properly restored from persistence. More... | |
void | AddOnMouseDown (Part.OnActionDelegate method) |
void | AddOnMouseEnter (Part.OnActionDelegate method) |
void | AddOnMouseExit (Part.OnActionDelegate method) |
PartResource | AddResource (ConfigNode node) |
Callback< IAirstreamShield > | AddShield (IAirstreamShield shd) |
void | AddSkinThermalFlux (double kilowatts) |
void | AddThermalFlux (double kilowatts) |
bool | AlreadyProcessedRequest (int requestID) |
bool | CheckCollision (Collision c) |
bool | checkLanded () |
bool | checkSplashed () |
void | cleanReferencesFromOtherParts () |
void | Couple (Part tgtPart) |
void | CreateInternalModel () |
void | deactivate () |
void | decouple (float breakForce=0f) |
void | DespawnAllCrew () |
void | Die () |
void | disconnect (bool controlledSeparation=false) |
virtual bool | DrainFuel (float amount) |
Deprecated. Use Part.TransferResource instead. More... | |
string | drawStats () |
void | Effect (string effectName) |
void | Effect (string effectName, float effectPower) |
void | explode () |
Calling this causes the part to explode. But you guessed that, didn't you? More... | |
AttachNode | findAttachNode (string nodeId) |
Find an AttachNode by its name, as a string. More... | |
AttachNode | findAttachNodeByPart (Part connectedPart) |
Given a child part of this part, find the AttachNode representing the connection between this part and that child. More... | |
AttachNode[] | findAttachNodes (string partialNodeId) |
T | FindChildPart< T > () |
T | FindChildPart< T > (bool recursive) |
Part | FindChildPart (string childName) |
Part | FindChildPart (string childName, bool recursive) |
T[] | FindChildParts< T > () |
T[] | FindChildParts< T > (bool recursive) |
virtual bool | FindFuel (Part source, List< Part > fuelSources, uint reqId) |
Obsolete - Use Part.GetConnectedResources instead. More... | |
FXGroup | findFxGroup (string groupID) |
Animation | FindModelAnimator (string animatorName, string clipName) |
Animation[] | FindModelAnimators () |
Animation[] | FindModelAnimators (string clipName) |
T | FindModelComponent< T > () |
T | FindModelComponent< T > (string childName) |
T[] | FindModelComponents< T > () |
T[] | FindModelComponents< T > (string childName) |
Transform | FindModelTransform (string childName) |
Transform[] | FindModelTransforms (string childName) |
T | FindModuleImplementing< T > () |
List< T > | FindModulesImplementing< T > () |
void | FindNonPhysicslessChildren (List< Part > parts) |
Part | FindNonPhysicslessParent () |
AttachNode | FindPartThroughNodes (Part tgtPart, Part src=null) |
bool | FindResource_StackPriority (Part origin, List< PartResource > sources, int resourceID, double demand, int requestID, bool getAll, ref double total, ref double totalMax, List< Part > partList, bool checkSurf) |
void | force_activate () |
Activates the part now, regardless of when it was scheduled to be activated in the staging order. More... | |
void | freeze () |
void | GetConnectedResources (int resourceID, ResourceFlowMode flowMode, List< PartResource > Resources) |
void | GetConnectedResources (int resourceID, ResourceFlowMode flowMode, List< PartResource > Resources, out double amount, out double maxAmount) |
float | GetModuleCosts (float defaultCost) |
float | GetModuleMass (float defaultMass) |
Vector3 | GetModuleSize (Vector3 defaultSize) |
float | GetPhysicslessChildMass () |
Transform | GetReferenceTransform () |
float | GetResourceMass () |
The total mass of the resources held by the part. The total mass of the part is More... | |
float | GetResourceMass (out double thermalMass) |
float | GetResourceMass (out float thermalMass) |
Part | getSymmetryCounterPart (int index) |
void | HandleCollision (Collision c) |
bool | hasIndirectChild (Part tgtPart) |
bool | hasIndirectParent (Part tgtPart) |
void | InitializeEffects () |
void | InitializeModules () |
bool | isSymmetryCounterPart (Part cPart) |
virtual void | LateUpdate () |
void | LoadEffects (ConfigNode node) |
PartModule | LoadModule (ConfigNode node, ref int moduleIndex) |
void | onAttach (Part parent, bool first=true) |
virtual void | onBackup () |
void | OnCollisionEnter (Collision c) |
void | OnCollisionExit (Collision c) |
void | OnCollisionStay (Collision c) |
void | OnCopy (Part original, bool asSymCounterpart) |
void | OnDelete () |
void | onDetach (bool first=true) |
virtual void | OnDrawStats () |
Obsolete("Functional behaviour should really be happening in PartModules now. In any case, this method's been replaced with OnGetStats, where you just return the string." More... | |
virtual void | onFlightStateLoad (Dictionary< string, KSPParseable > parsedData) |
virtual void | onFlightStateSave (Dictionary< string, KSPParseable > partDataCollection) |
virtual string | OnGetStats () |
void | OnLiftOff () |
void | OnLoad () |
virtual void | OnLoad (ConfigNode node) |
void | OnPartJointBreak (float breakForce) |
virtual void | OnSave (ConfigNode node) |
void | OnSplashDown () |
void | OnTouchDown () |
void | Pack () |
void | PromoteToPhysicalPart () |
void | propagateControlUpdate (FlightCtrlState st) |
void | RegisterCrew () |
void | removeChild (Part child) |
void | RemoveCrewmember (ProtoCrewMember crew) |
void | RemoveModule (PartModule module) |
void | RemoveModules () |
void | RemoveOnMouseDown (Part.OnActionDelegate method) |
void | RemoveOnMouseEnter (Part.OnActionDelegate method) |
void | RemoveOnMouseExit (Part.OnActionDelegate method) |
void | RemoveShield (IAirstreamShield shd) |
virtual bool | RequestFuel (Part source, float amount, uint reqId) |
Deprecated - Use Part.RequestResource instead. More... | |
virtual bool | RequestRCS (float amount, int earliestStage) |
Deprecated - Use Part.RequestResource instead. More... | |
virtual double | RequestResource (int resourceID, double demand) |
virtual float | RequestResource (int resourceID, float demand) |
virtual double | RequestResource (string resourceName, double demand) |
virtual float | RequestResource (string resourceName, float demand) |
virtual double | RequestResource (int resourceID, double demand, ResourceFlowMode flowMode) |
virtual double | RequestResource (string resourceName, double demand, ResourceFlowMode flowMode) |
void | ResetCollisionIgnores () |
IEnumerator | ResetJoints () |
void | ResumeVelocity () |
void | SaveEffects (ConfigNode node) |
void | ScheduleSetCollisionIgnores () |
void | SendEvent (string eventName) |
void | SendEvent (string eventName, BaseEventData data) |
void | SendEvent (string eventName, BaseEventData data, int maxDepth) |
void | SetCollisionIgnores () |
void | SetDetectCollisions (bool setState) |
void | SetHierarchyRoot (Part root) |
void | SetHighlight (bool active, bool recursive) |
void | SetHighlightColor () |
void | SetHighlightColor (Color color) |
void | SetHighlightDefault () |
void | SetHighlightType (Part.HighlightType type) |
void | SetMirror (Vector3 mirrorVector) |
void | setOpacity (float opacity) |
void | setParent (Part p=null) |
void | SetReferenceTransform (Transform t) |
void | SetResource (ConfigNode node) |
void | SpawnCrew () |
virtual double | TransferResource (int resourceID, double amount) |
virtual double | TransferResource (PartResource resource, double amount) |
void | Undock (DockedVesselInfo newVesselInfo) |
void | unfreeze () |
void | Unpack () |
void | UnregisterCrew () |
void | UpdateOrgPosAndRot (Part newRoot) |
void | UpdateStageability (bool master=true, bool iconUpdate=true) |
delegate void | OnActionDelegate (Part p) |
Static Public Member Functions | |
static | operator Part (GameObject o) |
static Part | FromGO (GameObject obj) |
static T | GetComponentUpwards< T > (GameObject obj) |
static Component | GetComponentUpwards (string type, GameObject obj) |
static uint | getFuelReqId () |
static void | GetPartsOutTo (Part part, HashSet< Part > parts, int maxLinks) |
static int | NewRequestID () |
static Vector3 | PartToVesselSpaceDir (Vector3 dir, Part p, Vessel v, PartSpaceMode space) |
static Vector3 | PartToVesselSpacePos (Vector3 pos, Part p, Vessel v, PartSpaceMode space) |
static Quaternion | PartToVesselSpaceRot (Quaternion rot, Part p, Vessel v, PartSpaceMode space) |
static Vector3 | VesselToPartSpaceDir (Vector3 dir, Part p, Vessel v, PartSpaceMode space) |
static Vector3 | VesselToPartSpacePos (Vector3 pos, Part p, Vessel v, PartSpaceMode space) |
static Quaternion | VesselToPartSpaceRot (Quaternion rot, Part p, Vessel v, PartSpaceMode space) |
Public Attributes | |
bool | ActivatesEvenIfDisconnected |
Whether this part will actually activate if it schedule to be activated in the same stage as it is decoupled from the rocket. In particular, sepratrons must have ActivatesEvenIfDisconnected set to true if they are to function properly. More... | |
double | aerodynamicArea |
Transform | airlock |
List< IAirstreamShield > | airstreamShields |
double | analyticInternalInsulationFactor |
double | analyticSkinInsulationFactor |
float | angularDrag |
bool | angularDragByFI |
double | atmDensity |
bool | attached |
PartJoint | attachJoint |
AttachNodeMethod | attachMethod |
AttachModes | attachMode |
Whether this part is attached to its parent via a stack AttachNode or a surface AttachNode. More... | |
List< AttachNode > | attachNodes |
An AttachNode represents the link between two attached parts. attachNodes is a list of possible nodes to which other parts can be attached to this part. You can find the parts that actually are attached using AttachNode.attachedPart. More... | |
AttachRules | attachRules |
Vector3 | attPos |
Vector3 | attPos0 |
Quaternion | attRotation |
Quaternion | attRotation0 |
Vector3 | bodyLiftLocalPosition |
Vector3 | bodyLiftLocalVector |
float | bodyLiftMultiplier |
float | bodyLiftScalar |
float | breakingForce |
float | breakingTorque |
float | buoyancy |
string | buoyancyUseCubeNamed |
bool | buoyancyUseSine |
Vector3 | CenterOfBuoyancy |
Vector3 | CenterOfDisplacement |
List< Part > | children |
The parts that are children of this part in the part tree (parts that were attached to this part in the editor after this part was already part of the vessel). More... | |
int | childStageOffset |
Collider | collider |
CollisionEnhancer | collisionEnhancer |
Vector3 | CoLOffset |
Vector3 | CoMOffset |
Vector3 | CoPOffset |
uint | craftID |
float | crashTolerance |
int | CrewCapacity |
How many crew members this part can fit. More... | |
bool | crewTransferAvailable |
List< Collider > | currentCollisions |
string | customPartData |
int | defaultInverseStage |
double | depth |
Part.DragModel | dragModel |
Unused? More... | |
Vector3 | dragReferenceVector |
float | dragScalar |
Vector3 | dragVector |
Vector3 | dragVectorDir |
Vector3 | dragVectorDirLocal |
float | dragVectorMag |
float | dragVectorSqrMag |
double | dynamicPressurekPa |
float | edgeHighlightThresholdMult |
Part | editorCollision |
List< Part > | editorLinks |
double | emissiveConstant |
float | explosionPotential |
double | exposedArea |
string | flagURL |
uint | flightID |
A unique identifider for this part. Note that despite the name, each part on the same vessel will still have a different value in this field. This value is persistent and not affected by game load or docking/undocking or similar. This is the 'uid' value at the PART level of the persistent.sfs file. More... | |
bool | frozen |
bool | fuelCrossFeed |
Whether this part allows fuel crossfeed. More... | |
List< Part > | fuelLookupTargets |
In the flight scene, fuelLookupTargets is the list of fuel lines through which this part can draw fuel. Also if this part is a docking node docked to a another docking node through which it can draw fuel, then the attached docking node will also be in fuelLookupTargets. More... | |
List< FXGroup > | fxGroups |
float | gaugeThresholdMult |
bool | GroundContact |
bool | hasHeiarchyModel |
bool | hasLiftModule |
float | hatchObstructionCheckInwardDistance |
float | hatchObstructionCheckInwardOffset |
float | hatchObstructionCheckOutwardDistance |
float | hatchObstructionCheckSphereRadius |
double | heatConductivity |
double | heatConvectiveConstant |
Color | highlightColor |
HighlightingSystem.Highlighter | highlighter |
Part.HighlightType | highlightType |
string | initialVesselName |
int | inStageIndex |
InternalModel | internalModel |
string | InternalModelName |
int | inverseStage |
The stage in which this part will activate, as shown in the staging display. (Possibly called inverseStage because the stages in KSP count down instead of up). More... | |
bool | isClone |
bool | isControlSource |
bool | isMirrored |
bool | isPersistent |
uint | lastFuelRequestId |
uint | launchID |
double | machNumber |
int | manualStageOffset |
float | mass |
The DRY mass of this part, not including the mass of any resources it contains More... | |
double | maxDepth |
float | maximum_drag |
The drag coefficient of this part is equal to (total mass) * (maximum_drag) More... | |
double | maxTemp |
The temperature at which this part will explode. More... | |
double | minDepth |
float | minimum_drag |
Unused. More... | |
Vector3 | mirrorAxis |
Vector3 | mirrorRefAxis |
Vector3 | mirrorVector |
uint | missionID |
A unique identifier assigned to the part when the vessel it is a part of is created. All parts on the vessel get the same missionID and it does not change. Splitting a vessel with a decoupler will result with two vessels whose parts have the same missionID. When two vessels spawned seperately dock, each part keeps its original missionID, undocking does not change this field either. More... | |
bool | noAutoEVA |
string | NoCrossFeedNodeKey |
Specifies the name of a node through which this part will NOT draw resources. See the part.cfg of the stock tricoupler for an example of using this to prevent fuel from flowing backwards. More... | |
Callback | OnEditorAttach |
Add a function to this callback and it will be called when your part is attached to another part in the editor. More... | |
Callback | OnEditorDestroy |
Add a function to this callback and it will be called when your part is deleted in the editor. More... | |
Callback | OnEditorDetach |
Add a function to this callback and it will be called when your part is detached, or is part of a set of parts that are detached, in the editor. More... | |
Callback | OnJustAboutToBeDestroyed |
Add a function to this callback and it will be called when your part is about to be destroyed during flight. More... | |
Vector3 | orgPos |
Quaternion | orgRot |
int | originalStage |
bool | packed |
Part | parent |
The parent of this part in the part tree: the part to which this part was attached in the editor. More... | |
PartBuoyancy | partBuoyancy |
AvailablePart | partInfo |
Some of the part info that is displayed about this part in the editor. More... | |
string | partName |
Transform | partTransform |
bool | PermanentGroundContact |
Part.PhysicalSignificance | physicalSignificance |
If physicalSignificance == Part.PhysicalSignificance.NONE, then this part doesn't actually have any physics. In particular, it has no mass, regardless of what its "mass" field is set to, and no drag. More... | |
int | PhysicsSignificance |
Unused? More... | |
Part | potentialParent |
List< ProtoCrewMember > | protoModuleCrew |
ProtoPartSnapshot | protoPartSnapshot |
double | radiativeArea |
double | radiatorCritical |
double | radiatorHeadroom |
double | radiatorMax |
Rigidbody | rb |
float | rescaleFactor |
double | resourceRequestRemainingThreshold |
double | resourceThermalMass |
PartStates | ResumeState |
float | scaleFactor |
int | separationIndex |
double | skinExposedArea |
double | skinExposedAreaFrac |
double | skinExposedMassMult |
double | skinInternalConductionMult |
double | skinMassPerArea |
double | skinMaxTemp |
double | skinSkinConductionMult |
double | skinTemperature |
double | skinThermalMass |
double | skinThermalMassModifier |
double | skinThermalMassRecip |
double | skinToInternalFlux |
double | skinUnexposedMassMult |
double | skinUnexposedTemperature |
AttachNode | srfAttachNode |
IF this part is surface-attached to its parent, srfAttachNode is the attach node describing this connection. More... | |
VStackIcon | stackIcon |
The sicon shown for this part in the staging display. More... | |
StackIconGrouping | stackIconGrouping |
double | stackPriThreshold |
int | stackSymmetry |
bool | stageAfter |
bool | stageBefore |
int | stageOffset |
string | stagingIcon |
bool | stagingIconAlwaysShown |
bool | stagingOn |
bool | started |
double | staticPressureAtm |
double | submergedDragScalar |
double | submergedDynamicPressurekPa |
double | submergedLiftScalar |
double | submergedPortion |
Vector3 | surfaceAreas |
SymmetryMethod | symMethod |
List< Part > | symmetryCounterparts |
double | temperature |
The temperature of this part, in some arbitrary units. More... | |
PQS_PartCollider | terrainCollider |
double | thermalConductionFlux |
double | thermalConvectionFlux |
double | thermalExposedFlux |
double | thermalExposedFluxPrevious |
double | thermalInternalFlux |
double | thermalInternalFluxPrevious |
double | thermalMass |
double | thermalMassModifier |
double | thermalMassReciprocal |
double | thermalRadiationFlux |
double | thermalSkinFlux |
double | thermalSkinFluxPrevious |
AttachNode | topNode |
Vector3 | vel |
Vessel | vessel |
The vessel to which this part belongs. Beware that vessel == null in the editor. More... | |
VesselType | vesselType |
float | waterAngularDragMultiplier |
bool | WaterContact |
Static Public Attributes | |
static Color | defaultHighlightNone |
static Color | defaultHighlightPart |
static uint | fuelRequestID |
Protected Member Functions | |
virtual void | onActiveFixedUpdate () |
virtual void | onActiveUpdate () |
virtual void | onCopy (Part original, bool asSymCounterpart) |
virtual void | onCtrlUpd (FlightCtrlState s) |
virtual void | onDecouple (float breakForce) |
virtual void | onDisconnect () |
virtual void | onEditorUpdate () |
virtual void | onFlightStart () |
virtual void | onFlightStartAtLaunchPad () |
virtual void | onGamePause () |
virtual void | onGameResume () |
virtual void | onJointDisable () |
virtual void | onJointReset () |
virtual void | onPack () |
virtual bool | onPartActivate () |
virtual void | onPartAttach (Part parent) |
virtual void | onPartAwake () |
virtual void | onPartDeactivate () |
virtual void | onPartDelete () |
virtual void | onPartDestroy () |
virtual void | onPartDetach () |
virtual void | onPartExplode () |
virtual void | onPartFixedUpdate () |
virtual void | onPartLiftOff () |
virtual void | onPartLoad () |
virtual void | onPartSplashdown () |
virtual void | onPartStart () |
virtual void | onPartTouchdown () |
virtual void | onPartUpdate () |
virtual void | onStartComplete () |
virtual void | onUnpack () |
void | SetLayer (GameObject obj, int layer) |
Protected Attributes | |
bool | connected |
List< Part > | resourceTargets |
PartStates | state |
Properties | |
BaseActionList | Actions [get] |
int | ClassID [get] |
string | ClassName [get] |
DragCubeList | DragCubes [get] |
EffectList | Effects [get] |
BaseEventList | Events [get] |
BaseFieldList | Fields [get] |
bool | hasStagingIcon [get] |
bool | isAttached [get, set] |
bool | isConnected [get, set] |
Obsolete since 0.14 and no longer working More... | |
bool | isControllable [get] |
bool | Landed [get] |
Part | localRoot [get] |
PartModuleList | Modules [get] |
Orbit | orbit [get] |
Don't use this; use Vessel.orbit instead. More... | |
PartValues | PartValues [get] |
PartResourceList | Resources [get] |
A list of the resources contained by this part. You can loop over them with More... | |
Rigidbody | Rigidbody [get] |
The rigidbody of this part. See the Unity documentation on rigidbodies for more information. More... | |
bool | ShieldedFromAirstream [get, set] |
bool | Splashed [get] |
PartStates | State [get] |
Vector3 | WCoM [get] |
Each part on a vessel is represented by a Part object. Plugins can add new functionality to parts by defining new PartModules, which can then be added to Parts. It is also possible to define new subclasses of Part, but this is deprecated in favor of PartModules.
|
strong |
|
strong |
|
strong |
Part.Part | ( | ) |
bool Part.activate | ( | int | currentStage, |
Vessel | activeVessel | ||
) |
void Part.AddAttachNode | ( | ConfigNode | node | ) |
void Part.addChild | ( | Part | child | ) |
bool Part.AddCrewmember | ( | ProtoCrewMember | crew | ) |
bool Part.AddCrewmemberAt | ( | ProtoCrewMember | crew, |
int | seatIndex | ||
) |
void Part.AddExposedThermalFlux | ( | double | kilowatts | ) |
InternalModel Part.AddInternalPart | ( | ConfigNode | node | ) |
PartModule Part.AddModule | ( | ConfigNode | node | ) |
PartModule Part.AddModule | ( | string | moduleName | ) |
Add a PartModule to this part. PartModules that are dynamically added to parts and don't exist in the original part.cfg will not be properly restored from persistence.
moduleName | The class name of the PartModule to add, as a string |
void Part.AddOnMouseDown | ( | Part.OnActionDelegate | method | ) |
void Part.AddOnMouseEnter | ( | Part.OnActionDelegate | method | ) |
void Part.AddOnMouseExit | ( | Part.OnActionDelegate | method | ) |
PartResource Part.AddResource | ( | ConfigNode | node | ) |
Callback<IAirstreamShield> Part.AddShield | ( | IAirstreamShield | shd | ) |
void Part.AddSkinThermalFlux | ( | double | kilowatts | ) |
void Part.AddThermalFlux | ( | double | kilowatts | ) |
bool Part.AlreadyProcessedRequest | ( | int | requestID | ) |
bool Part.CheckCollision | ( | Collision | c | ) |
bool Part.checkLanded | ( | ) |
bool Part.checkSplashed | ( | ) |
void Part.cleanReferencesFromOtherParts | ( | ) |
void Part.Couple | ( | Part | tgtPart | ) |
void Part.CreateInternalModel | ( | ) |
void Part.deactivate | ( | ) |
void Part.decouple | ( | float | breakForce = 0f | ) |
void Part.DespawnAllCrew | ( | ) |
void Part.Die | ( | ) |
void Part.disconnect | ( | bool | controlledSeparation = false | ) |
|
virtual |
string Part.drawStats | ( | ) |
void Part.Effect | ( | string | effectName | ) |
void Part.Effect | ( | string | effectName, |
float | effectPower | ||
) |
void Part.explode | ( | ) |
Calling this causes the part to explode. But you guessed that, didn't you?
AttachNode Part.findAttachNode | ( | string | nodeId | ) |
Find an AttachNode by its name, as a string.
nodeId | The name of the node to search for. The names of nodes are found in the part.cfg. For instance, node_stack_top describes a node with name "stack_top." |
AttachNode Part.findAttachNodeByPart | ( | Part | connectedPart | ) |
Given a child part of this part, find the AttachNode representing the connection between this part and that child.
connectedPart | A child part of this part. |
AttachNode [] Part.findAttachNodes | ( | string | partialNodeId | ) |
Part Part.FindChildPart | ( | string | childName | ) |
Part Part.FindChildPart | ( | string | childName, |
bool | recursive | ||
) |
T Part.FindChildPart< T > | ( | ) |
T | : | Part |
T Part.FindChildPart< T > | ( | bool | recursive | ) |
T | : | Part |
T [] Part.FindChildParts< T > | ( | ) |
T | : | Part |
T [] Part.FindChildParts< T > | ( | bool | recursive | ) |
T | : | Part |
Obsolete - Use Part.GetConnectedResources instead.
FXGroup Part.findFxGroup | ( | string | groupID | ) |
Animation Part.FindModelAnimator | ( | string | animatorName, |
string | clipName | ||
) |
Animation [] Part.FindModelAnimators | ( | ) |
Animation [] Part.FindModelAnimators | ( | string | clipName | ) |
T Part.FindModelComponent< T > | ( | ) |
T | : | Component |
T Part.FindModelComponent< T > | ( | string | childName | ) |
T | : | Component |
T [] Part.FindModelComponents< T > | ( | ) |
T | : | Component |
T [] Part.FindModelComponents< T > | ( | string | childName | ) |
T | : | Component |
Transform Part.FindModelTransform | ( | string | childName | ) |
Transform [] Part.FindModelTransforms | ( | string | childName | ) |
T Part.FindModuleImplementing< T > | ( | ) |
T | : | class |
List<T> Part.FindModulesImplementing< T > | ( | ) |
T | : | class |
void Part.FindNonPhysicslessChildren | ( | List< Part > | parts | ) |
Part Part.FindNonPhysicslessParent | ( | ) |
AttachNode Part.FindPartThroughNodes | ( | Part | tgtPart, |
Part | src = null |
||
) |
bool Part.FindResource_StackPriority | ( | Part | origin, |
List< PartResource > | sources, | ||
int | resourceID, | ||
double | demand, | ||
int | requestID, | ||
bool | getAll, | ||
ref double | total, | ||
ref double | totalMax, | ||
List< Part > | partList, | ||
bool | checkSurf | ||
) |
void Part.force_activate | ( | ) |
Activates the part now, regardless of when it was scheduled to be activated in the staging order.
void Part.freeze | ( | ) |
|
static |
|
static |
|
static |
T | : | Component |
void Part.GetConnectedResources | ( | int | resourceID, |
ResourceFlowMode | flowMode, | ||
List< PartResource > | Resources | ||
) |
void Part.GetConnectedResources | ( | int | resourceID, |
ResourceFlowMode | flowMode, | ||
List< PartResource > | Resources, | ||
out double | amount, | ||
out double | maxAmount | ||
) |
|
static |
float Part.GetModuleCosts | ( | float | defaultCost | ) |
float Part.GetModuleMass | ( | float | defaultMass | ) |
Vector3 Part.GetModuleSize | ( | Vector3 | defaultSize | ) |
float Part.GetPhysicslessChildMass | ( | ) |
Transform Part.GetReferenceTransform | ( | ) |
float Part.GetResourceMass | ( | ) |
The total mass of the resources held by the part. The total mass of the part is
mass + GetResourceMass()
float Part.GetResourceMass | ( | out double | thermalMass | ) |
float Part.GetResourceMass | ( | out float | thermalMass | ) |
Part Part.getSymmetryCounterPart | ( | int | index | ) |
void Part.HandleCollision | ( | Collision | c | ) |
bool Part.hasIndirectChild | ( | Part | tgtPart | ) |
bool Part.hasIndirectParent | ( | Part | tgtPart | ) |
void Part.InitializeEffects | ( | ) |
void Part.InitializeModules | ( | ) |
bool Part.isSymmetryCounterPart | ( | Part | cPart | ) |
|
virtual |
void Part.LoadEffects | ( | ConfigNode | node | ) |
PartModule Part.LoadModule | ( | ConfigNode | node, |
ref int | moduleIndex | ||
) |
|
static |
delegate void Part.OnActionDelegate | ( | Part | p | ) |
|
protectedvirtual |
|
protectedvirtual |
void Part.onAttach | ( | Part | parent, |
bool | first = true |
||
) |
|
virtual |
Reimplemented in FuelLine.
void Part.OnCollisionEnter | ( | Collision | c | ) |
void Part.OnCollisionExit | ( | Collision | c | ) |
void Part.OnCollisionStay | ( | Collision | c | ) |
|
protectedvirtual |
Reimplemented in FuelLine.
void Part.OnCopy | ( | Part | original, |
bool | asSymCounterpart | ||
) |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in FuelTank, and FuelTankGUI.
void Part.OnDelete | ( | ) |
void Part.onDetach | ( | bool | first = true | ) |
|
protectedvirtual |
Reimplemented in AdvSASModule.
|
virtual |
Obsolete("Functional behaviour should really be happening in PartModules now. In any case, this method's been replaced with OnGetStats, where you just return the string."
Reimplemented in FuelLine, FuelTank, FuelTankGUI, DecouplerGUI, DockingPort, and Decoupler.
|
protectedvirtual |
Reimplemented in FuelLine.
|
protectedvirtual |
Reimplemented in FuelLine, FuelTank, FuelTankGUI, DockingPort, and AdvSASModule.
|
protectedvirtual |
|
virtual |
Reimplemented in FuelTank, and FuelTankGUI.
|
virtual |
Reimplemented in FuelTank, and FuelTankGUI.
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
void Part.OnLiftOff | ( | ) |
void Part.OnLoad | ( | ) |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in FuelTank, FuelTankGUI, DockingPort, DecouplerGUI, and Decoupler.
|
protectedvirtual |
Reimplemented in FuelTank, and FuelTankGUI.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in FuelLine, and AdvSASModule.
|
protectedvirtual |
Reimplemented in FuelLine.
|
protectedvirtual |
Reimplemented in AdvSASModule.
|
protectedvirtual |
Reimplemented in FuelLine, FuelTank, and AdvSASModule.
void Part.OnPartJointBreak | ( | float | breakForce | ) |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in FuelLine.
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in FuelLine, FuelTank, FuelTankGUI, DockingPort, DecouplerGUI, AdvSASModule, and Decoupler.
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
void Part.OnSplashDown | ( | ) |
|
protectedvirtual |
void Part.OnTouchDown | ( | ) |
|
protectedvirtual |
|
explicitstatic |
void Part.Pack | ( | ) |
|
static |
|
static |
|
static |
void Part.PromoteToPhysicalPart | ( | ) |
void Part.propagateControlUpdate | ( | FlightCtrlState | st | ) |
void Part.RegisterCrew | ( | ) |
void Part.removeChild | ( | Part | child | ) |
void Part.RemoveCrewmember | ( | ProtoCrewMember | crew | ) |
void Part.RemoveModule | ( | PartModule | module | ) |
void Part.RemoveModules | ( | ) |
void Part.RemoveOnMouseDown | ( | Part.OnActionDelegate | method | ) |
void Part.RemoveOnMouseEnter | ( | Part.OnActionDelegate | method | ) |
void Part.RemoveOnMouseExit | ( | Part.OnActionDelegate | method | ) |
void Part.RemoveShield | ( | IAirstreamShield | shd | ) |
|
virtual |
Deprecated - Use Part.RequestResource instead.
source | |
amount | |
reqId |
Reimplemented in FuelLine, FuelTank, and FuelTankGUI.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
void Part.ResetCollisionIgnores | ( | ) |
IEnumerator Part.ResetJoints | ( | ) |
void Part.ResumeVelocity | ( | ) |
void Part.SaveEffects | ( | ConfigNode | node | ) |
void Part.ScheduleSetCollisionIgnores | ( | ) |
void Part.SendEvent | ( | string | eventName | ) |
void Part.SendEvent | ( | string | eventName, |
BaseEventData | data | ||
) |
void Part.SendEvent | ( | string | eventName, |
BaseEventData | data, | ||
int | maxDepth | ||
) |
void Part.SetCollisionIgnores | ( | ) |
void Part.SetDetectCollisions | ( | bool | setState | ) |
void Part.SetHierarchyRoot | ( | Part | root | ) |
void Part.SetHighlight | ( | bool | active, |
bool | recursive | ||
) |
void Part.SetHighlightColor | ( | ) |
void Part.SetHighlightColor | ( | Color | color | ) |
void Part.SetHighlightDefault | ( | ) |
void Part.SetHighlightType | ( | Part.HighlightType | type | ) |
|
protected |
void Part.SetMirror | ( | Vector3 | mirrorVector | ) |
void Part.setOpacity | ( | float | opacity | ) |
void Part.setParent | ( | Part | p = null | ) |
void Part.SetReferenceTransform | ( | Transform | t | ) |
void Part.SetResource | ( | ConfigNode | node | ) |
void Part.SpawnCrew | ( | ) |
|
virtual |
|
virtual |
void Part.Undock | ( | DockedVesselInfo | newVesselInfo | ) |
void Part.unfreeze | ( | ) |
void Part.Unpack | ( | ) |
void Part.UnregisterCrew | ( | ) |
void Part.UpdateOrgPosAndRot | ( | Part | newRoot | ) |
void Part.UpdateStageability | ( | bool | master = true , |
bool | iconUpdate = true |
||
) |
|
static |
|
static |
|
static |
bool Part.ActivatesEvenIfDisconnected |
Whether this part will actually activate if it schedule to be activated in the same stage as it is decoupled from the rocket. In particular, sepratrons must have ActivatesEvenIfDisconnected set to true if they are to function properly.
double Part.aerodynamicArea |
Transform Part.airlock |
List<IAirstreamShield> Part.airstreamShields |
double Part.analyticInternalInsulationFactor |
double Part.analyticSkinInsulationFactor |
float Part.angularDrag |
bool Part.angularDragByFI |
double Part.atmDensity |
bool Part.attached |
PartJoint Part.attachJoint |
AttachNodeMethod Part.attachMethod |
AttachModes Part.attachMode |
Whether this part is attached to its parent via a stack AttachNode or a surface AttachNode.
List<AttachNode> Part.attachNodes |
An AttachNode represents the link between two attached parts. attachNodes is a list of possible nodes to which other parts can be attached to this part. You can find the parts that actually are attached using AttachNode.attachedPart.
AttachRules Part.attachRules |
Vector3 Part.attPos |
Vector3 Part.attPos0 |
Quaternion Part.attRotation |
Quaternion Part.attRotation0 |
Vector3 Part.bodyLiftLocalPosition |
Vector3 Part.bodyLiftLocalVector |
float Part.bodyLiftMultiplier |
float Part.bodyLiftScalar |
float Part.breakingForce |
float Part.breakingTorque |
float Part.buoyancy |
string Part.buoyancyUseCubeNamed |
bool Part.buoyancyUseSine |
Vector3 Part.CenterOfBuoyancy |
Vector3 Part.CenterOfDisplacement |
List<Part> Part.children |
The parts that are children of this part in the part tree (parts that were attached to this part in the editor after this part was already part of the vessel).
int Part.childStageOffset |
Collider Part.collider |
CollisionEnhancer Part.collisionEnhancer |
Vector3 Part.CoLOffset |
Vector3 Part.CoMOffset |
|
protected |
Vector3 Part.CoPOffset |
uint Part.craftID |
float Part.crashTolerance |
int Part.CrewCapacity |
How many crew members this part can fit.
bool Part.crewTransferAvailable |
List<Collider> Part.currentCollisions |
string Part.customPartData |
|
static |
|
static |
int Part.defaultInverseStage |
double Part.depth |
Part.DragModel Part.dragModel |
Unused?
Vector3 Part.dragReferenceVector |
float Part.dragScalar |
Vector3 Part.dragVector |
Vector3 Part.dragVectorDir |
Vector3 Part.dragVectorDirLocal |
float Part.dragVectorMag |
float Part.dragVectorSqrMag |
double Part.dynamicPressurekPa |
float Part.edgeHighlightThresholdMult |
Part Part.editorCollision |
List<Part> Part.editorLinks |
double Part.emissiveConstant |
float Part.explosionPotential |
double Part.exposedArea |
string Part.flagURL |
uint Part.flightID |
A unique identifider for this part. Note that despite the name, each part on the same vessel will still have a different value in this field. This value is persistent and not affected by game load or docking/undocking or similar. This is the 'uid' value at the PART level of the persistent.sfs file.
bool Part.frozen |
bool Part.fuelCrossFeed |
Whether this part allows fuel crossfeed.
List<Part> Part.fuelLookupTargets |
In the flight scene, fuelLookupTargets is the list of fuel lines through which this part can draw fuel. Also if this part is a docking node docked to a another docking node through which it can draw fuel, then the attached docking node will also be in fuelLookupTargets.
|
static |
List<FXGroup> Part.fxGroups |
float Part.gaugeThresholdMult |
bool Part.GroundContact |
bool Part.hasHeiarchyModel |
bool Part.hasLiftModule |
float Part.hatchObstructionCheckInwardDistance |
float Part.hatchObstructionCheckInwardOffset |
float Part.hatchObstructionCheckOutwardDistance |
float Part.hatchObstructionCheckSphereRadius |
double Part.heatConductivity |
double Part.heatConvectiveConstant |
Color Part.highlightColor |
HighlightingSystem.Highlighter Part.highlighter |
Part.HighlightType Part.highlightType |
string Part.initialVesselName |
int Part.inStageIndex |
InternalModel Part.internalModel |
string Part.InternalModelName |
int Part.inverseStage |
The stage in which this part will activate, as shown in the staging display. (Possibly called inverseStage because the stages in KSP count down instead of up).
bool Part.isClone |
bool Part.isControlSource |
bool Part.isMirrored |
bool Part.isPersistent |
uint Part.lastFuelRequestId |
uint Part.launchID |
double Part.machNumber |
int Part.manualStageOffset |
float Part.mass |
The DRY mass of this part, not including the mass of any resources it contains
double Part.maxDepth |
float Part.maximum_drag |
The drag coefficient of this part is equal to (total mass) * (maximum_drag)
double Part.maxTemp |
The temperature at which this part will explode.
double Part.minDepth |
float Part.minimum_drag |
Unused.
Vector3 Part.mirrorAxis |
Vector3 Part.mirrorRefAxis |
Vector3 Part.mirrorVector |
uint Part.missionID |
A unique identifier assigned to the part when the vessel it is a part of is created. All parts on the vessel get the same missionID and it does not change. Splitting a vessel with a decoupler will result with two vessels whose parts have the same missionID. When two vessels spawned seperately dock, each part keeps its original missionID, undocking does not change this field either.
bool Part.noAutoEVA |
string Part.NoCrossFeedNodeKey |
Specifies the name of a node through which this part will NOT draw resources. See the part.cfg of the stock tricoupler for an example of using this to prevent fuel from flowing backwards.
Callback Part.OnEditorAttach |
Add a function to this callback and it will be called when your part is attached to another part in the editor.
Callback Part.OnEditorDestroy |
Add a function to this callback and it will be called when your part is deleted in the editor.
Callback Part.OnEditorDetach |
Add a function to this callback and it will be called when your part is detached, or is part of a set of parts that are detached, in the editor.
Callback Part.OnJustAboutToBeDestroyed |
Add a function to this callback and it will be called when your part is about to be destroyed during flight.
Vector3 Part.orgPos |
Quaternion Part.orgRot |
int Part.originalStage |
bool Part.packed |
Part Part.parent |
The parent of this part in the part tree: the part to which this part was attached in the editor.
PartBuoyancy Part.partBuoyancy |
AvailablePart Part.partInfo |
Some of the part info that is displayed about this part in the editor.
string Part.partName |
Transform Part.partTransform |
bool Part.PermanentGroundContact |
Part.PhysicalSignificance Part.physicalSignificance |
If physicalSignificance == Part.PhysicalSignificance.NONE, then this part doesn't actually have any physics. In particular, it has no mass, regardless of what its "mass" field is set to, and no drag.
int Part.PhysicsSignificance |
Unused?
Part Part.potentialParent |
List<ProtoCrewMember> Part.protoModuleCrew |
ProtoPartSnapshot Part.protoPartSnapshot |
double Part.radiativeArea |
double Part.radiatorCritical |
double Part.radiatorHeadroom |
double Part.radiatorMax |
Rigidbody Part.rb |
float Part.rescaleFactor |
double Part.resourceRequestRemainingThreshold |
|
protected |
double Part.resourceThermalMass |
PartStates Part.ResumeState |
float Part.scaleFactor |
int Part.separationIndex |
double Part.skinExposedArea |
double Part.skinExposedAreaFrac |
double Part.skinExposedMassMult |
double Part.skinInternalConductionMult |
double Part.skinMassPerArea |
double Part.skinMaxTemp |
double Part.skinSkinConductionMult |
double Part.skinTemperature |
double Part.skinThermalMass |
double Part.skinThermalMassModifier |
double Part.skinThermalMassRecip |
double Part.skinToInternalFlux |
double Part.skinUnexposedMassMult |
double Part.skinUnexposedTemperature |
AttachNode Part.srfAttachNode |
IF this part is surface-attached to its parent, srfAttachNode is the attach node describing this connection.
VStackIcon Part.stackIcon |
The sicon shown for this part in the staging display.
StackIconGrouping Part.stackIconGrouping |
double Part.stackPriThreshold |
int Part.stackSymmetry |
bool Part.stageAfter |
bool Part.stageBefore |
int Part.stageOffset |
string Part.stagingIcon |
bool Part.stagingIconAlwaysShown |
bool Part.stagingOn |
bool Part.started |
|
protected |
double Part.staticPressureAtm |
double Part.submergedDragScalar |
double Part.submergedDynamicPressurekPa |
double Part.submergedLiftScalar |
double Part.submergedPortion |
Vector3 Part.surfaceAreas |
SymmetryMethod Part.symMethod |
List<Part> Part.symmetryCounterparts |
double Part.temperature |
The temperature of this part, in some arbitrary units.
PQS_PartCollider Part.terrainCollider |
double Part.thermalConductionFlux |
double Part.thermalConvectionFlux |
double Part.thermalExposedFlux |
double Part.thermalExposedFluxPrevious |
double Part.thermalInternalFlux |
double Part.thermalInternalFluxPrevious |
double Part.thermalMass |
double Part.thermalMassModifier |
double Part.thermalMassReciprocal |
double Part.thermalRadiationFlux |
double Part.thermalSkinFlux |
double Part.thermalSkinFluxPrevious |
AttachNode Part.topNode |
Vector3 Part.vel |
Vessel Part.vessel |
The vessel to which this part belongs. Beware that vessel == null in the editor.
VesselType Part.vesselType |
float Part.waterAngularDragMultiplier |
bool Part.WaterContact |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
getset |
|
getset |
Obsolete since 0.14 and no longer working
|
get |
|
get |
|
get |
|
get |
|
get |
Don't use this; use Vessel.orbit instead.
|
get |
|
get |
A list of the resources contained by this part. You can loop over them with
foreach(PartResource resource in part.Resources) { ... }
|
get |
The rigidbody of this part. See the Unity documentation on rigidbodies for more information.
|
getset |
|
get |
|
get |
|
get |