Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Properties | List of all members
Part Class Reference
Inheritance diagram for Part:
CompoundPart

Classes

struct  ForceHolder
 
class  ReflectedAttributes
 

Public Types

enum  AutoStrutMode {
  AutoStrutMode.Off, AutoStrutMode.Root, AutoStrutMode.Heaviest, AutoStrutMode.Grandparent,
  AutoStrutMode.ForceRoot, AutoStrutMode.ForceHeaviest, AutoStrutMode.ForceGrandparent
}
 
enum  DragModel {
  DragModel.DEFAULT, DragModel.CONIC, DragModel.CYLINDRICAL, DragModel.SPHERICAL,
  DragModel.CUBE, DragModel.NONE
}
 
enum  HighlightType { HighlightType.Disabled, HighlightType.OnMouseOver, HighlightType.AlwaysOn }
 
enum  PhysicalSignificance { PhysicalSignificance.FULL, PhysicalSignificance.NONE }
 
enum  ShowRigidAttachmentOption { ShowRigidAttachmentOption.Never, ShowRigidAttachmentOption.Editor, ShowRigidAttachmentOption.Always }
 

Public Member Functions

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)
 
void AddForce (Vector3d vec)
 Adds force to the part's (or parent's up the tree) rb. NOTE: ForceMode == Force. If you want a different mode, convert to ForceMode.Force. More...
 
void AddForceAtPosition (Vector3d vec, Vector3d pos)
 Adds force to the part's (or parent's up the tree) rb, at the specified position. NOTE: ForceMode == Force. If you want a different mode, convert to ForceMode.Force. More...
 
void AddImpulse (Vector3d vec)
 Adds force to the part's (or parent's up the tree) rb as an impulse (i.e. divides force by fixedDeltaTime More...
 
InternalModel AddInternalPart (ConfigNode node)
 
PartModule AddModule (string moduleName, bool forceAwake=false)
 
PartModule AddModule (ConfigNode node, bool forceAwake=false)
 
void AddOnMouseDown (OnActionDelegate method)
 
void AddOnMouseEnter (OnActionDelegate method)
 
void AddOnMouseExit (OnActionDelegate method)
 
void AddPartModuleAdjusterList (List< AdjusterPartModuleBase > moduleAdjusters)
 Applies given module adjusters to the appropriate part modules More...
 
PartResource AddResource (ConfigNode node)
 Add a PartResource to this Part from a ConfigNode. More...
 
Callback< IAirstreamShieldAddShield (IAirstreamShield shd)
 
void AddSkinThermalFlux (double kilowatts)
 
void AddThermalFlux (double kilowatts)
 
void AddTorque (Vector3d vec)
 Adds given torque to the part's (or parent's up the tree) rb. NOTE: ForceMode == Force. If you want a different mode, convert to ForceMode.Force. More...
 
void AimCamera ()
 
bool AllowAutoStruts ()
 
bool AlreadyProcessedRequest (int requestID)
 
void ApplyRigidAttachment ()
 
void Awake ()
 
virtual bool CanCrossfeed (Part target, string resName, ResourceFlowMode flow=ResourceFlowMode.NULL)
 Can this Part Crossfeed a Resource between itself and another part? More...
 
virtual bool CanCrossfeed (Part target, int resourceID, ResourceFlowMode flow=ResourceFlowMode.NULL)
 Can this Part Crossfeed a Resource between itself and another part? More...
 
void ChangeResourcePriority (int offset)
 
void CheckBodyLiftAttachment ()
 
bool CheckCollision (Collision c)
 
bool checkLanded ()
 
void checkPermanentLandedAt ()
 
bool checkSplashed ()
 
void CheckTransferDialog ()
 
void CleanSymmetryReferences ()
 
void CleanSymmetryVesselReferences ()
 
void CleanSymmetryVesselReferencesRecursively ()
 
void clearParent ()
 called by the editor when the selected part is cloned. Use this in stead of setParent(null) to avoid invoking GameEvents.onPartRemove in cases where you are not actually removing a part from the ship. More...
 
void Couple (Part tgtPart)
 
void CreateAttachJoint (AttachModes mode)
 
void CreateInternalModel ()
 
void CycleAutoStrut ()
 
void deactivate ()
 
void decouple (float breakForce=0.0f)
 
void DemoteToPhysicslessPart ()
 This will demote a Physical part to a physicsless part. Use with Care. More...
 
void DespawnIVA ()
 
void Die ()
 
void disconnect (bool controlledSeparation=false)
 
virtual bool DrainFuel (float amount)
 
string drawStats ()
 
void Effect (string effectName, int transformIdx=-1)
 
void Effect (string effectName, float effectPower, int transformIdx=-1)
 
void explode ()
 
void explode (float offset)
 
AttachNode FindAttachNode (string nodeId)
 returns an attachment node that matches the given id name. (a node's id is the third section of it's definition in the cfg, or for srfAttach nodes: 'srfAttach') More...
 
AttachNode FindAttachNodeByPart (Part connectedPart)
 
AttachNode[] FindAttachNodes (string partialNodeId)
 returns an array of attachNodes, whose ids CONTAIN the given id string. (use this one to get multiple nodes at once, when they have similar ids, like node_stack_top1, node_stack_top2...) More...
 
Part FindChildPart (string childName)
 
Part FindChildPart (string childName, bool recursive)
 
FindChildPart< T > ()
 
FindChildPart< T > (bool recursive)
 
T[] FindChildParts< T > ()
 
T[] FindChildParts< T > (bool recursive)
 
virtual bool FindFuel (Part source, List< Part > fuelSources, uint reqId)
 
FXGroup findFxGroup (string groupID)
 
Animation FindModelAnimator (string animatorName, string clipName)
 
Animation FindModelAnimator (string clipName)
 
Animation[] FindModelAnimators (string clipName)
 
Animation[] FindModelAnimators ()
 
FindModelComponent< T > ()
 
FindModelComponent< T > (string childName)
 
List< T > FindModelComponents< T > ()
 
List< T > FindModelComponents< T > (string childName)
 
List< MeshRenderer > FindModelMeshRenderersCached ()
 Find all Model MeshRenderer Components on the part. Use the previous cached results if available More...
 
List< Renderer > FindModelRenderersCached ()
 Find all Model Renderer Components on the part. Use the previous cached results if available More...
 
List< SkinnedMeshRenderer > FindModelSkinnedMeshRenderersCached ()
 Find all Model SkinnedMeshRenderer Components on the part. Use the previous cached results if available More...
 
Transform FindModelTransform (string childName)
 
Transform FindModelTransformByLayer (string layerName)
 Finds a model transform that uses a given layer More...
 
Transform[] FindModelTransforms (string childName)
 
Transform[] FindModelTransformsWithTag (string tag)
 Finds model transforms that have a given tag More...
 
FindModuleImplementing< T > ()
 Returns the first ocurrence of a module in this part, if any More...
 
List< T > FindModulesImplementing< T > ()
 Returns all modules of the given part type More...
 
void FindNonPhysicslessChildren (ref List< Part > parts)
 
Part FindNonPhysicslessParent ()
 
FindParentModuleImplementing< T > ()
 Returns the first occurrence of a module in this Part's parent tree, if any. More...
 
AttachNode FindPartThroughNodes (Part tgtPart, Part src=null)
 Finds the attachnode (if any) that leads to the given part More...
 
void FixedUpdate ()
 
void force_activate ()
 
void force_activate (bool playFX)
 
void freeze ()
 
void GainCameraAim ()
 
void GetConnectedResourceTotals (int resourceID, out double amount, out double maxAmount, bool pulling=true)
 Get the Connected Resource totals. Obeys resource crossfeed rules. More...
 
virtual void GetConnectedResourceTotals (int resourceID, ResourceFlowMode flowMode, out double amount, out double maxAmount, bool pulling=true)
 Get the Connected Resource totals. More...
 
void GetConnectedResourceTotals (int resourceID, out double amount, out double maxAmount, double threshold, bool pulling=true)
 Get the Connected Resource totals. More...
 
virtual void GetConnectedResourceTotals (int resourceID, ResourceFlowMode flowMode, out double amount, out double maxAmount, double threshold, bool pulling=true)
 Get the Connected Resource totals. More...
 
virtual void GetConnectedResourceTotals (int resourceID, ResourceFlowMode flowMode, bool simulate, out double amount, out double maxAmount, double threshold, bool pulling=true)
 Get the Connected Resource totals. More...
 
int GetCrewCountOfExperienceEffect< T > ()
 Will return a count of the number of crew on board the part that have the experience effect that is passed in. More...
 
List< ProtoCrewMemberGetCrewOfExperienceEffect< T > ()
 Will return a list of the crew on board the part that have the experience effect that is passed in. More...
 
Part GetMassivePart (Part start, out Part lastPart, out AttachNode nodeToParent, out AttachNode nodeFromParent, out bool srfAttached, params Part[] excluded)
 
float GetModuleCosts (float defaultCost, ModifierStagingSituation sit=ModifierStagingSituation.CURRENT)
 Returns the sum of cost modifications from IPartCostModifier modules. More...
 
float GetModuleMass (float defaultMass, ModifierStagingSituation sit=ModifierStagingSituation.CURRENT)
 Returns the sum of mass modifications from IPartMassModifier modules. More...
 
Vector3 GetModuleSize (Vector3 defaultSize, ModifierStagingSituation sit=ModifierStagingSituation.CURRENT)
 Returns the sum of size modifications from IPartSizeModifier modules. More...
 
PartModule.StartState GetModuleStartState ()
 
virtual Collider[] GetPartColliders ()
 
virtual Renderer[] GetPartRenderers ()
 
float GetPhysicslessChildMass ()
 
virtual Part GetReferenceParent ()
 
virtual Transform GetReferenceTransform ()
 
float GetResourceMass ()
 Get the Mass of all Resources in the part. More...
 
float GetResourceMass (bool simulate)
 Get the Mass of all Resources in the part. More...
 
float GetResourceMass (out float thermalMass)
 Get the Mass of all Resources in the part. More...
 
float GetResourceMass (out double thermalMass)
 Get the Mass of all Resources in the part. More...
 
virtual int GetResourcePriority ()
 
Part getSymmetryCounterPart (int index)
 
void HandleCollision (Collision c)
 
bool HasAutoStrutDefined ()
 Returns true if there are autostruts defined. More...
 
bool HasFreePivot ()
 
bool hasIndirectChild (Part tgtPart)
 Returns true if the target part is in the direct hierarchy of this part. More...
 
bool hasIndirectParent (Part tgtPart)
 Returns true if the target part is in the direct hierarchy of this part. More...
 
bool HasModuleImplementing< T > ()
 Tests whether this Part has a PartModule of this type More...
 
bool HasValidContractObjective (string objectiveType)
 
void HeatGaugeUpdate ()
 
void Highlight (bool active)
 Manually highlights the part using default hightlighting color More...
 
void Highlight (Color highlightColor)
 Manually highlights the part. More...
 
void HighlightRecursive (bool active)
 Recursively highlights the part and it's children (to a lesser degree) More...
 
void HighlightRecursive (Color highlightColor)
 Recursively highlights the part and it's children (to a lesser degree) More...
 
void InitializeEffects ()
 
void InitializeModules ()
 
bool isAirIntake (out ModuleResourceIntake intake)
 Is this Part an Air Intake or not? More...
 
bool isAnchoredDecoupler (out ModuleAnchoredDecoupler moduleAnchoredDecoupler)
 Is this Part an AnchoredDecoupler or not? More...
 
bool isAntenna (out ModuleDeployableAntenna antenna)
 Is this Part an Antenna or not? More...
 
bool isBaseServo (out BaseServo servo)
 
bool isCargoPart ()
 Is this Part a Cargo Part or not? More...
 
bool isChildOfRoboticRotor ()
 Is this Part a Child of a Part that is a Robotic Rotor or not? (A Parent implements ModuleRoboticServoRotor). More...
 
bool isControlSurface ()
 Is this Part a Control Surface (Implements ModuleControlSurface). More...
 
bool isControlSurface (out ModuleControlSurface controlSurface)
 Is this Part a Control Surface (Implements ModuleControlSurface). More...
 
bool isDecoupler (out ModuleDecouple moduleDecoupler)
 Is this Part a Decoupler or not? Does not include AnchoredDecoupler. Use isAnchoredDecoupler() to check. More...
 
bool isDockingPort (out ModuleDockingNode dockingPort)
 Is this Part a dockingPort or not? More...
 
bool isEngine ()
 Is this Part a ModuleEngines or not? More...
 
bool isEngine (out List< ModuleEngines > engines)
 Does this Part contain a ModuleEngines? More...
 
bool isFairing ()
 Is this Part a Fairing or not? More...
 
bool isGenerator (out ModuleGenerator generator)
 Is this Part a Generator or not? More...
 
bool isGroundDeployable ()
 Is this Ground Deployable Part or not? More...
 
bool isInventoryPart ()
 Is this Part a Cargo Inventory Part or not? More...
 
bool isKerbalEVA ()
 Is this Part a an EVA Kerbal? More...
 
bool isKerbalSeat ()
 Is this Part a Kerbal Seat or not? More...
 
bool isLaunchClamp ()
 Is this Part a LaunchClamp or not? More...
 
bool isParachute ()
 Is this Part a Parachute or not? More...
 
bool isRadiator (out ModuleDeployableRadiator radiator)
 Is this Part a Radiator or not? More...
 
bool isRobotic ()
 Is this Part a Robotic Part or not? More...
 
bool isRoboticController ()
 Is this Part a Robotics Controller or not More...
 
bool isRoboticController (out ModuleRoboticController controller)
 
bool isRoboticHinge ()
 Is this Part a Robotic Hinge Part or not? (Implements ModuleRoboticServoHinge). More...
 
bool isRoboticPiston ()
 Is this Part a Robotic Piston Part or not? (Implements ModuleRoboticServoPiston). More...
 
bool isRoboticRotationServo ()
 Is this Part a Robotic RotationServo Part or not? (Implements ModuleRoboticServoRotationServo). More...
 
bool isRoboticRotor ()
 Is this Part a Robotic Rotor Part or not? (Implements ModuleRoboticServoRotor). More...
 
bool isSolarPanel (out ModuleDeployableSolarPanel solarPanel)
 Is this Part a Solar Panel or not? More...
 
bool isSymmetryCounterPart (Part cPart)
 
bool isTrackingShipConstructIDChanges (out List< IShipConstructIDChanges > modules)
 Is this Part tracking ID changes in Ship Construct in any modules More...
 
bool IsUnderConstructionWeightLimit ()
 Checks if the parts Weight is below the construction limit (PhysicsGlobals.ConstructionWeightLimit) More...
 
void LandedCollisionChecks (Collision c)
 
virtual void LateUpdate ()
 
void LoadEffects (ConfigNode node)
 
PartModule LoadModule (ConfigNode node, ref int moduleIndex)
 
void LoseCameraAim ()
 
void ModulesBeforePartAttachJoint ()
 
void ModulesOnActivate ()
 
void ModulesOnDeactivate ()
 
void ModulesOnFixedUpdate ()
 
void ModulesOnStart ()
 
void ModulesOnStartFinished ()
 
void ModulesOnUpdate ()
 
delegate void OnActionDelegate (Part p)
 
void onAttach (Part parent, bool first=true)
 Called by editor logic when the part is attached to the ship. Propagates childward. (parent hierarchy is followed) More...
 
void OnAttachFlight (Part parent)
 Attaches this part to the parent passed in as a parameter. More...
 
virtual void onBackup ()
 Called whenever a backup snapshot is created from the ship More...
 
void OnCollisionEnter (Collision c)
 
void OnCollisionExit (Collision c)
 
void OnCollisionStay (Collision c)
 
virtual void OnConstructionModeFixedUpdate ()
 This method will be called when in EVA Construction mode and this part is disabled (when it is not attached to a vessel) every FixedUpdate(). It will call the same named method on every PartModule on the part which can be override by any PartModule. More...
 
virtual void OnConstructionModeUpdate ()
 This method will be called when in EVA Construction mode and this part is disabled (when it is not attached to a vessel) every Update(). It will call the same named method on every PartModule on the part which can be override by any PartModule. More...
 
void OnCopy (Part original, bool asSymCounterpart)
 This method is called on a clone/copied Part right after it's been created from another part in the editor scene. It copies the resources, their amounts. It calls Copy method on all the PartModules on this part. It then copies/sets the variant and calls OnCopy on all children Parts on this part. More...
 
void OnDelete ()
 
void onDetach (bool first=true)
 Called by editor logic when the part is pulled off the ship. Propagates childward More...
 
void OnDetachFlight ()
 Detaches a part from a vessel during Flight Scene. Method quits if loaded scene is not Flight or if it has at least 1 child part. More...
 
virtual void OnDrawStats ()
 
virtual void onEditorEndTweak ()
 Called when the part finishes getting tweaked in position/rotation on the editor (Mainly for struts). More...
 
virtual void onEditorStartTweak ()
 Called when the part starts getting tweaked in position/rotation on the editor (Mainly for struts). More...
 
virtual void onFlightStateLoad (Dictionary< string, KSPParseable > parsedData)
 Called when the flight scene is being loaded. Use to retrieve saved module data. More...
 
virtual void onFlightStateSave (Dictionary< string, KSPParseable > partDataCollection)
 Called when the state of the flight scene is being saved. Use to save module data. Add KSPParseable objects to the partDataCollection to have them saved. (use descriptive, unique names) More...
 
virtual string OnGetStats ()
 Override to return part-specific stats as a string More...
 
virtual void OnInventoryModeDisable ()
 This method will be called when this part is first disabled (when it is not attached to a vessel) when created in Inventory/Construction mode. It will call the same named method on every PartModule on the part which can be override by any PartModule. More...
 
virtual void OnInventoryModeEnable ()
 This method will be called when this part is first enabled (when it is attached to a vessel) when created in Inventory/Construction mode. It will call the same named method on every PartModule on the part which can be override by any PartModule. More...
 
void OnLiftOff ()
 
void OnLoad ()
 
virtual void OnLoad (ConfigNode node)
 
virtual void OnPartCreatedFomInventory (ModuleInventoryPart moduleInventoryPart)
 This method is called when a part is being taken out from a slot while being in EVAConstruction mode. More...
 
void OnPartJointBreak (float breakForce)
 
void OnPointerClick (PointerEventData eventData)
 
virtual void OnSave (ConfigNode node)
 
void OnSplashDown ()
 
void OnTouchDown ()
 
void OnWasCopied (Part newPart, bool asSymCounterpart)
 This method is called right after a Part is about to be copied in the editor scene. Calls OnWasCopied on all PartModules on this part. Calls OnWasCopied on all children Parts on this part. More...
 
void OnWillBeCopied (bool asSymCounterpart)
 This method is called right before a Part is about to be copied in the editor scene. Calls OnWillBeCopied on all PartModules on this part. Calls OnWillBeCopied on all children Parts on this part. More...
 
bool OnWillBeMirrored (ref Quaternion rotation, AttachNode selPartNode, Part partParent)
 This is called in the Editor scene when a symmetry copy of a part is being positioned. Only called on the symmetry parts and only when symmetry mode is set to Mirror. It allows the mirror rotation to be changed and returned before being applied to the symmetry copy part. It will call OnWillBeMirrored on all Part Modules on the Part. It does NOT call on children Parts. More...
 
void Pack ()
 
bool PartCanBeDetached ()
 
bool PartCanBeOffset ()
 
bool PartCanBeRotated ()
 
void PartRepair ()
 Removes all the adjusters that can be repaired on this part. More...
 
void PromoteToPhysicalPart ()
 
void propagateControlUpdate (FlightCtrlState st)
 
void RefreshHighlighter ()
 
void RegisterCrew ()
 
void ReleaseAutoStruts ()
 
void RelinkPrefab ()
 
void removeChild (Part child)
 
void RemoveCrewmember (ProtoCrewMember crew)
 
void RemoveFromSymmetry ()
 Remove this part from symmetry partners and clear its symmetry More...
 
void RemoveModule (PartModule module)
 
void RemoveModules ()
 
void RemoveOnMouseDown (OnActionDelegate method)
 
void RemoveOnMouseEnter (OnActionDelegate method)
 
void RemoveOnMouseExit (OnActionDelegate method)
 
void RemovePartModuleAdjusterList (List< AdjusterPartModuleBase > moduleAdjusters)
 Removes the given adjusters More...
 
bool RemoveResource (PartResource res)
 Remove a Resource from the part. More...
 
bool RemoveResource (string rName)
 Remove a Resource from the part. More...
 
bool RemoveResource (int resID)
 Remove a Resource from the part. More...
 
void RemoveSameVesselInteraction (KSPActionParam act)
 Disable the SameVesselCollision bool. More...
 
void RemoveShield (IAirstreamShield shd)
 
virtual bool RequestFuel (Part source, float amount, uint reqId)
 
virtual bool RequestRCS (float amount, int earliestStage)
 
virtual float RequestResource (int resourceID, float demand)
 Deprecated, please use double RequestResource(int, double). Using this may cause rounding issues with fuel flow More...
 
virtual float RequestResource (string resourceName, float demand)
 Deprecated, please use double RequestResource(string, double). Using this may cause rounding issues with fuel flow More...
 
virtual double RequestResource (int resourceID, double demand)
 Request a Resource. Obeys resource flow mode. More...
 
virtual double RequestResource (int resourceID, double demand, bool simulate)
 Request a Resource. Obeys resource flow mode. More...
 
virtual double RequestResource (string resourceName, double demand)
 Request a Resource. Obeys resource flow mode. More...
 
virtual double RequestResource (string resourceName, double demand, bool simulate)
 Request a Resource. Obeys resource flow mode. More...
 
virtual double RequestResource (int resourceID, double demand, ResourceFlowMode flowMode)
 Request a Resource. Obeys resource flow mode. More...
 
virtual double RequestResource (int resourceID, double demand, ResourceFlowMode flowMode, bool simulate)
 Request a Resource. Obeys resource flow mode. More...
 
virtual double RequestResource (string resourceName, double demand, ResourceFlowMode flowMode)
 Request a Resource. More...
 
virtual double RequestResource (string resourceName, double demand, ResourceFlowMode flowMode, bool simulate)
 Request a Resource. More...
 
void ResetCamera ()
 
void ResetCollisionIgnores ()
 
void ResetCollisions ()
 Will reset all known collisions for this Part and reset the Vessel's landed/splash status. Use at your own risk! More...
 
void ResetCollisionsCheck ()
 
void ResetJoints ()
 
void ResetModelMeshRenderersCache ()
 Reset the cached result of MeshRenderer components on this part More...
 
void ResetModelRenderersCache ()
 Reset the cached result of Renderer components on this part More...
 
void ResetModelSkinnedMeshRenderersCache ()
 Reset the cached result of SkinnedMeshRenderer components on this part More...
 
void ResetMPB ()
 Resets the part MaterialPropertyBlock to handle its shader properties More...
 
void ResetPri ()
 
void ResetSimulation ()
 Will Reset the SimulationResources list. More...
 
void ResetSimulationResources ()
 Resets the SimulationResources list amounts (from the Resources list). More...
 
void ResetSimulationResources (PartResourceList sourceList)
 Resets the SimulationResources list amounts (from a passed in Resources list). More...
 
void ResumeVelocity ()
 Applies the orbital velocity to the rigidbodies on the ship, so that it continues to orbit by physics More...
 
void SaveEffects (ConfigNode node)
 
void ScheduleSetCollisionIgnores ()
 
void SendEvent (string eventName)
 
void SendEvent (string eventName, BaseEventDetails data)
 
void SendEvent (string eventName, BaseEventDetails data, int maxDepth)
 
void SetCollisionIgnores ()
 
void SetDetectCollisions (bool setState)
 
void SetHierarchyRoot (Part root)
 Sets this part as the root of the vessel hierarchy. Will flip parent-child references recursively so that this part becomes the parent for everyone. More...
 
void SetHighlight (bool active, bool recursive)
 Set the highlight state manually More...
 
void SetHighlightColor (Color color)
 Sets the highlight colour. Use no color to reset to default More...
 
void SetHighlightColor ()
 Sets the highlight colour to default. Use colour parameter to set the colour. More...
 
void SetHighlightDefault ()
 Sets the PartHighlight to default settings More...
 
void SetHighlightType (HighlightType type)
 Sets the highlight type for this part - default is PartHighlight.HighlightType.OnMouseOver More...
 
void SetMirror (Vector3 mirrorVector)
 
void SetOpacity (float opacity)
 set the opacity of the part More...
 
void setParent (Part p=null)
 called by the editor when the part is attached or detached from the ship. More...
 
void SetReferenceTransform (Transform t)
 
void SetResource (ConfigNode node)
 Finds and Reloads (or creates if not found) a Resource in the ResourceList and SimulationResourceList from a ConfigNode. More...
 
void SetSameVesselInteraction (KSPActionParam act)
 Enable the SameVesselCollision bool. More...
 
virtual void SetSymmetryValues (Vector3 newPosition, Quaternion newRotation)
 
void SetupAttachNodes ()
 
void SetupHighlighter ()
 
void SetupResources ()
 Cretes the Resources and Simulation resources PartResourceLists if they don't exist or are not valid. More...
 
void SetupRigidAttachmentUI ()
 
void SetupSimulationResources ()
 
void SetVesselNaming ()
 
virtual void ShowUpgradeStats ()
 
void SpawnIVA ()
 
void SpawnTransferDialog ()
 
void ToggleAutoStrut ()
 
void ToggleRigidAttachment ()
 
void ToggleSameVesselInteraction (KSPActionParam act)
 Toggles the SameVesselCollision bool. More...
 
virtual double TransferResource (int resourceID, double amount)
 Transfer some amount of Resources in or out of this part. More...
 
virtual double TransferResource (PartResource resource, double amount, Part other)
 Transfer some amount of Resources in or out of this part. More...
 
virtual double TransferResource (PartResource resource, double amount, Part other, bool simulate)
 Transfer some amount of Resources in or out of this part. More...
 
void Undock (DockedVesselInfo newVesselInfo)
 
void unfreeze ()
 
void Unpack ()
 
void UnregisterCrew ()
 
void Update ()
 
void UpdateAeroDisplay ()
 
void UpdateAttachNodes ()
 
void UpdateAutoStrut ()
 
void UpdateMass ()
 
void UpdateOrgPosAndRot (Part newRoot)
 
void UpdateSrfAttachNode ()
 
void UpdateStageability (bool propagate, bool iconUpdate)
 
void ValidateInertiaTensor ()
 
delegate void voidPartDelegate (Part p)
 

Static Public Member Functions

static void _CheckPartG (Part p)
 
static void _CheckPartPressure (Part p)
 
static void _CheckPartTemp (Part p)
 
static Part FindChildPart (Part parent, string childName)
 
static T FindChildPart< T > (Part parent)
 
static void FindChildParts< T > (Part parent, List< T > tList)
 
static Transform FindHeirarchyTransform (Transform parent, string childName)
 
static Transform FindHeirarchyTransformByLayer (Transform parent, string layerName)
 Finds a transform that uses a given layer inside a given transform More...
 
static void FindHeirarchyTransforms (Transform parent, string childName, List< Transform > tList)
 
static void FindHeirarchyTransformsByTag (Transform parent, string tag, List< Transform > tList)
 Finds transforms in the hierarchy of a given parent by tag More...
 
static Animation FindModelAnimator (Transform modelTransform, string animatorName, string clipName)
 
static T FindModelComponent< T > (Transform parent, string childName)
 
static void FindModelComponents< T > (Transform parent, string childName, List< T > tList)
 
static Transform FindTransformInChildrenExplicit (Transform parent, Transform find)
 
static Part FromGO (GameObject obj)
 
static Component GetComponentUpwards (string type, GameObject obj)
 
static T GetComponentUpwards< T > (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)
 Transform a direction from a part's local space to vessel-relative space More...
 
static Vector3 PartToVesselSpacePos (Vector3 pos, Part p, Vessel v, PartSpaceMode space)
 Transform a point from a part's local space to vessel-relative space More...
 
static Quaternion PartToVesselSpaceRot (Quaternion rot, Part p, Vessel v, PartSpaceMode space)
 Transform a rotation from a part's local space to vessel-relative space More...
 
static Vector3 VesselToPartSpaceDir (Vector3 dir, Part p, Vessel v, PartSpaceMode space)
 Transform a direction from vessel-relative space to a part's local space More...
 
static Vector3 VesselToPartSpacePos (Vector3 pos, Part p, Vessel v, PartSpaceMode space)
 Transform a point from vessel-relative space to a part's local space More...
 
static Quaternion VesselToPartSpaceRot (Quaternion rot, Part p, Vessel v, PartSpaceMode space)
 Transform a rotation from vessel-relative space to a part's local space More...
 

Public Attributes

double absorptiveConstant = -1d
 
bool ActivatesEvenIfDisconnected = true
 
bool aeroDisplayWasActive = false
 
double aerodynamicArea = 0d
 
Transform airlock
 noAutoEVAAny disables auto EVA always, whereas noAutoEVAMulti allows it if there is only one part on the vessel. More...
 
List< IAirstreamShieldairstreamShields = new List<IAirstreamShield>()
 
bool alwaysShowResourcePriority = false
 
double analyticInternalInsulationFactor = 1d
 
double analyticSkinInsulationFactor = 1d
 
float angularDrag = 2f
 
bool angularDragByFI = true
 
bool applyKerbalMassModification = true
 Whether the part should apply mass modifications due to crew mass. More...
 
AsteroidCollider asteroidCollider
 
double atmDensity
 1.0+ thermo More...
 
PartJoint attachJoint
 
AttachNodeMethod attachMethod
 
AttachModes attachMode
 
List< AttachNodeattachNodes = new List<AttachNode>()
 
AttachRules attachRules
 
Vector3 attPos = Vector3.zero
 
Vector3 attPos0 = Vector3.zero
 
Quaternion attRotation = Quaternion.identity
 
Quaternion attRotation0 = Quaternion.identity
 
bool autoStrutEnableOptionEditor = true
 
bool autoStrutEnableOptionFlight = true
 
bool autoStrutExcludeParent = true
 
AutoStrutMode autoStrutMode = AutoStrutMode.Off
 
PartVariant baseVariant
 The Base Variant for this Part. More...
 
float blackBodyRadiationAlphaMult = 1f
 
ArrowPointer bodyLiftArrowPtr
 
Vector3 bodyLiftLocalPosition = Vector3.zero
 
Vector3 bodyLiftLocalVector = Vector3.zero
 
float bodyLiftMultiplier = 1f
 
string bodyLiftOnlyAttachName
 
ILiftProvider bodyLiftOnlyProvider = null
 
bool bodyLiftOnlyUnattachedLift = false
 
bool bodyLiftOnlyUnattachedLiftActual = false
 
float bodyLiftScalar = 0f
 
Vector3 boundsCentroidOffset = Vector3.zero
 
float boundsMultiplier = 1f
 
float breakingForce = 22f
 
float breakingTorque = 22f
 
float buoyancy = 1.0f
 
string buoyancyUseCubeNamed = ""
 
bool buoyancyUseSine = true
 
bool canAimCamera = true
 
Vector3 CenterOfBuoyancy = Vector3.zero
 
Vector3 CenterOfDisplacement = Vector3.zero
 
List< Partchildren = new List<Part>()
 
int childStageOffset = 0
 
new Collider collider
 
CollisionEnhancer collisionEnhancer
 
int collisionEnhancerSkipFrames = 5
 The number of FixedUpdate frames to skip when the part is made physical (from physicsless) in the CollisionEnhancer component. More...
 
Vector3 CoLOffset = Vector3.zero
 
Vector3 CoMOffset = Vector3.zero
 
List< IConstructionconstructionModules
 A cached list of PartModules that implement IConstruction interface. Set list to null to reset the cache. More...
 
Vector3 CoPOffset = Vector3.zero
 
uint craftID
 a unique id used in the editor. Defaults to object instance id or loaded from craft data. Will not be reliable after docking More...
 
float crashTolerance = 9f
 
int CrewCapacity = 0
 
double crewRespawnTime = 0d
 
bool crewTransferAvailable = true
 
PartSet crossfeedPartSet
 This is the cross feed PartSet for this part. It is created by the Vessel and ShipConstruct classes. More...
 
DictionaryValueList< Collider,
int > 
currentCollisions = new DictionaryValueList<Collider, int>()
 
string customPartData = ""
 A string for saving and loading custom part data. (Do not use linebreaks here. If storing multiple values, separate them with a semicolon More...
 
Coroutine cyclingAutoStruts
 
int defaultInverseStage = 0
 
List< PartModuledockingPorts = new List<PartModule>()
 original position and rotation, in relation to the vessel. This is set by the vessel when it's first initialized More...
 
ArrowPointer dragArrowPtr
 
DragModel dragModel = DragModel.CUBE
 
Vector3 dragReferenceVector = Vector3.up
 
float dragScalar = 0f
 
Vector3 dragVector = Vector3.up
 
Vector3 dragVectorDir = Vector3.up
 
Vector3 dragVectorDirLocal = Vector3.up
 
float dragVectorMag = 0f
 
float dragVectorSqrMag = 0f
 
double dynamicPressurekPa
 
float edgeHighlightThresholdMult = 1f
 
Part editorCollision
 
bool editorFirstTimePlaced = false
 First time the part is placed in the vessel in VAB More...
 
List< ParteditorLinks = new List<Part>()
 
bool editorStarted = false
 
double emissiveConstant = 0.4d
 
float explosionPotential = 0.5f
 
double exposedArea = 0d
 
string FailureState = "Failed"
 
string flagURL = ""
 
uint flightID
 a unique id to identify this part in flight. This one is guaranteed to be unique for all parts in the simulation. Not assigned in the editor. More...
 
Vector3d force = Vector3d.zero
 
List< ForceHolderforces = new List<ForceHolder>(2)
 
bool frozen
 
bool fuelCrossFeed = true
 
bool fuelFlowOverlayEnabled = false
 
List< PartfuelLookupTargets = new List<Part>()
 
List< FXGroupfxGroups = new List<FXGroup>()
 
float gaugeThresholdMult = 1f
 
float gExplodeChance = 0.8f
 Chance per second, i.e. multiplied by fixedDeltaTime More...
 
bool GroundContact
 
double gTolerance = 50d
 
float habitableVolume = 0
 
bool hasHeiarchyModel
 
bool hasKerbalOnLadder = false
 This will be true if there is a EVA kerbal standing on a ladder on this part. More...
 
bool hasLiftModule = false
 
float hatchObstructionCheckInwardDistance = 1.1f
 
float hatchObstructionCheckInwardOffset = 1f
 
float hatchObstructionCheckOutwardDistance = 1f
 
float hatchObstructionCheckSphereOffset = 0.1f
 
float hatchObstructionCheckSphereRadius = 0.22f
 
double heatConductivity = 0.12d
 
double heatConvectiveConstant = 1.0d
 
Color highlightColor = defaultHighlightPart
 
HighlightType highlightType = HighlightType.OnMouseOver
 
string initialVesselName
 
Quaternion initRotation = Quaternion.identity
 
int inStageIndex = -1
 
InternalModel internalModel
 
string InternalModelName = ""
 
int inverseStage = 0
 
bool inverseStageCarryover = true
 True when this inverseStage index should carry over to non-stageable parts. More...
 
bool isClone = false
 
Vessel.ControlLevel isControlSource
 Flag for whether this part can provide input to the vessel. (tweaked by command modules) More...
 
bool isMirrored = false
 set to true if mirrorVector != Vector3.one More...
 
bool isPersistent
 
string isShieldedDisplay = ""
 
uint lastFuelRequestId = 0
 
uint launchID
 another unique number shared by all parts launched together on the same vessel More...
 
double machNumber = 0f
 
int manualStageOffset = -1
 
float mass = 2.0f
 
float maximum_drag = 0.1f
 
double maxPressure = 4000d
 
double maxTemp = 2000d
 
double minDepth
 
float minimum_drag = 0.1f
 
Vector3 mirrorAxis = Vector3.zero
 
Vector3 mirrorRefAxis
 
Vector3 mirrorVector = Vector3.one
 
uint missionID
 a unique number shared by all parts launched together on the same vessel More...
 
Vector3 moduleSize = Vector3.zero
 
bool needPrefabMass = true
 
bool noAutoEVAAny = false
 
bool noAutoEVAMulti = false
 
string NoCrossFeedNodeKey = ""
 
Callback OnEditorAttach = () => { }
 
Callback OnEditorDestroy = () => { }
 
Callback OnEditorDetach = () => { }
 
Callback OnJustAboutToBeDestroyed = () => { }
 
Callback OnJustAboutToDie = () => { }
 
Vector3 orgPos
 
Quaternion orgRot
 
Part originalPart
 
int originalStage = 0
 
bool overrideSkillUpdate = false
 
string overrideSkillUpdateModules = "ModuleSAS, ModuleWheelSteering"
 
bool packed
 
Part parent
 
PartBuoyancy partBuoyancy
 
AvailablePart partInfo
 
string partName
 
List< string > partRendererBoundsIgnore
 
float partSeatMassReduction = 0f
 The amount of mass that was removed in the db load based on the number of seats and if the part has a command module More...
 
Transform partTransform
 
bool PermanentGroundContact
 flags if part is always touching the surface, i.e. a launch clamp. More...
 
uint persistentId
 a unique id used for the life of the part. More...
 
PhysicalSignificance physicalSignificance = PhysicalSignificance.FULL
 
double physicsMass = 0d
 
int PhysicsSignificance = -1
 
Part potentialParent
 
float prefabMass = 0f
 
Vector3 prefabSize = Vector3.zero
 
PartStates PreFailState = PartStates.IDLE
 
float presExplodeChance = 0.8f
 Chance per second, i.e. multiplied by fixedDeltaTime More...
 
PhysicalSignificance previousPhysicalSignificance
 References the physical significance before swapping it due the rotate or move tools on construction mode More...
 
List< ProtoCrewMemberprotoModuleCrew = new List<ProtoCrewMember>()
 
ProtoPartSnapshot protoPartSnapshot
 
PartThermalData ptd
 
double radiativeArea = 0d
 
double radiatorCritical = 0.75d
 
double radiatorHeadroom = 0.25d
 
double radiatorMax = 0.25d
 
Rigidbody rb
 
bool recheckShielding = true
 This is the local variant of AlwaysRecheckShielding. If this is false, even if AlwaysRecheckShielding is true, we won't recheck shielding. More...
 
float rescaleFactor = 1.25f
 This is the scale factor that's applied after loading. It rescales the model and any nodes. Use to convert from model space to world space. More...
 
float resourceMass = 0f
 
int resourcePriorityOffset = 0
 
bool resourcePriorityUseParentInverseStage = false
 If true, instead of our inverseStage, use parent's (if not null) inverseStage when reporting res priority More...
 
double resourceRequestRemainingThreshold = 1e-12d
 
double resourceThermalMass = 0d
 
PartStates ResumeState = PartStates.IDLE
 
bool rigidAttachment = false
 
bool sameVesselCollision = false
 If this field is True colliders on this part will interact with colliders on other Parts within the same Vessel that also have this field set to true. More...
 
float scaleFactor = 1f
 This is the scale factor used in the mesh exporter. Use to convert from 3D scene space to model space. More...
 
int separationIndex = 0
 
Rigidbody servoRb
 If the Part contains a BaseServo (Robotic servo) this will be set to the moving part of the servo's RB (The part has two RBs). More...
 
ShipConstruct ship
 
ShowRigidAttachmentOption showRigidOption = ShowRigidAttachmentOption.Editor
 
PartSet simulationCrossfeedPartSet
 This is the simulation cross feed PartSet for this part used in delta v calculations. It is created by the Vessel and ShipConstruct classes. More...
 
double skinExposedArea = 0f
 
double skinExposedAreaFrac = 0f
 
double skinExposedMassMult = 1d
 
double skinInternalConductionMult = 1d
 
double skinMassPerArea = 1d
 
double skinMaxTemp = -1d
 
double skinSkinConductionMult = 1d
 
double skinTemperature
 
double skinThermalMass
 
double skinThermalMassModifier = 1d
 
double skinThermalMassRecip
 
double skinToInternalFlux = 0d
 
double skinUnexposedExternalTemp = 4f
 
double skinUnexposedMassMult = 0d
 
double skinUnexposedTemperature = 0d
 
bool skipColliderIgnores = false
 
AttachNode srfAttachNode
 
KSP.UI.Screens.ProtoStageIcon stackIcon
 
StackIconGrouping stackIconGrouping = StackIconGrouping.SYM_COUNTERPARTS
 flag for whether the part is connected to the command pod or not (however indirectly) [Needless to say, this is obsolete logic now) More...
 
double stackPriThreshold = 1e-3d
 public bool DEBUG = false; More...
 
int stackSymmetry = 0
 
bool stageAfter = false
 
bool stageBefore = false
 
int stageOffset = 0
 
string stagingIcon = ""
 
bool stagingIconAlwaysShown = false
 
bool stagingOn = true
 
bool started
 
double staticPressureAtm
 
Vector3 strutOffset = Vector3.zero
 
double submergedDragScalar = 1d
 
double submergedDynamicPressurekPa = 0d
 
double submergedLiftScalar = 0d
 
double submergedPortion = 0d
 
Vector3 surfaceAreas = Vector3.one
 
GameObject surfaceAttachGO
 
SymmetryMethod symMethod
 
List< PartsymmetryCounterparts = new List<Part>()
 
double temperature = -1d
 
float tempExplodeChance = 0.8f
 Chance per second, i.e. multiplied by fixedDeltaTime More...
 
PQS_PartCollider terrainCollider
 
double thermalConductionFlux
 
double thermalConvectionFlux
 
double thermalExposedFlux
 
double thermalExposedFluxPrevious
 
double thermalInternalFlux
 
double thermalInternalFluxPrevious
 
double thermalMass = 0d
 
double thermalMassModifier = 1.0d
 
double thermalMassReciprocal = 1d
 
double thermalRadiationFlux
 
double thermalSkinFlux
 
double thermalSkinFluxPrevious
 
AttachNode topNode
 
Vector3d torque = Vector3d.zero
 
ModulePartVariants variants
 The PartModule Variants for this part (if one is attached). More...
 
Vector3 vel
 
Vessel vessel
 
VesselNaming vesselNaming
 
VesselType vesselType = VesselType.Debris
 
float waterAngularDragMultiplier = 1f
 
bool WaterContact
 

Static Public Attributes

static List< PartallParts = new List<Part>()
 
static bool AlwaysRecheckShielding = true
 Do we force a recheck of shielding a frame after Start() finsihes? This is so if a shield was somehow destroyed prior to start and our state is still shielded, we don't always stay shielded. This one is static, and if false, no parts will do this. More...
 
static voidPartDelegate CheckPartG = _CheckPartG
 
static voidPartDelegate CheckPartPressure = _CheckPartPressure
 
static voidPartDelegate CheckPartTemp = _CheckPartTemp
 
static float defaultHighlightFalloff = 2f
 
static Color defaultHighlightNone = new Color32(0, 0, 0, 0)
 
static Color defaultHighlightPart = Highlighter.colorPartHighlightDefault
 
static uint fuelRequestID = 0
 
static LayerMask layerMask = LayerUtil.DefaultEquivalent | (1 << 26) | (1 << 1)
 
static voidPartDelegate UpgradeStatsDel
 

Protected Member Functions

virtual void onActiveFixedUpdate ()
 called on physics update, when the part is active. use to update active parts, like engines More...
 
virtual void onActiveUpdate ()
 called on regular update, when the part is active. More...
 
virtual void onCopy (Part original, bool asSymCounterpart)
 Called when the part is instantiated as a copy, through Alt+Copy or symmetry More...
 
virtual void onCtrlUpd (FlightCtrlState s)
 propagates downwards from the active command pod. will reach every part that is still connected More...
 
virtual void onDecouple (float breakForce)
 called when the part is detached from the ship assembly (breakForce > 0 means the part was broken off) More...
 
virtual void onDisconnect ()
 called when a parent of this part was detached from the ship More...
 
virtual void onEditorUpdate ()
 called on physics update while the game is at the VAB. More...
 
virtual void onFlightStart ()
 called when entering flight mode. More...
 
virtual void onFlightStartAtLaunchPad ()
 called when entering flight mode as a new flight (on the launch pad). More...
 
virtual void onGamePause ()
 called when the game is paused. use to store values and resume them later More...
 
virtual void onGameResume ()
 called when the game is resumed back from a pause state. use to restore values saved in onGamePause More...
 
virtual void onJointDisable ()
 
virtual void onJointReset ()
 
virtual void onPack ()
 
virtual bool onPartActivate ()
 called when the part is activated More...
 
virtual void onPartAttach (Part parent)
 called when the part is attached to another (in the editor). When this is called all needed attachment operations are completed. More...
 
virtual void onPartAwake ()
 called when the part is first instantiated. Use to overwrite part parameters if needed. Will be called at loading time, and also at each new instance. More...
 
virtual void onPartDeactivate ()
 called when the active part is deactivated, like an engine when it runs out of fuel More...
 
virtual void onPartDelete ()
 called when the part is manually deleted on the VAB More...
 
virtual void onPartDestroy ()
 
virtual void onPartDetach ()
 called when the part is detached from the ship (in the editor). When this is called all needed detachment operations are completed. More...
 
virtual void onPartExplode ()
 called when the part explodes. More...
 
virtual void onPartFixedUpdate ()
 called on every physics update. use to update passive parts that need to apply forces or use much physics, like winglets or RCS. More...
 
virtual void onPartLiftOff ()
 
virtual void onPartLoad ()
 called only once, when the part is first loaded into the game. Use to create components, and do stuff that only needs to be done once. More...
 
virtual void onPartSplashdown ()
 
virtual void onPartStart ()
 called when the unity Start() method is called. More...
 
virtual void onPartTouchdown ()
 
virtual void onPartUpdate ()
 Called once per frame. use to update passive parts that don't affect physics, like radiators or solar panels More...
 
virtual void onStartComplete ()
 called at the end of the start method in all scenes. In flight, this is after rigidbody initialization. More...
 
virtual void onUnpack ()
 
virtual void onWasCopied (Part copyPart, bool asSymCounterpart)
 Called when the part was copied, through Alt+Copy or symmetry More...
 
virtual void onWillBeCopied (bool asSymCounterpart)
 Called when the part is about to be copied, through Alt+Copy or symmetry More...
 
IEnumerator RecheckShielding ()
 
void SetLayer (GameObject obj, int layer)
 

Static Protected Member Functions

static ReflectedAttributes GetReflectedAttributes (Type partModuleType)
 

Protected Attributes

bool attached = false
 Flag for whether the part is directly attached to another (it's not the same as parent != null because this is also true for root parts) More...
 
bool compund
 Flag for whether the part is able to attach to another More...
 
bool connected = false
 
bool explodeOverheat
 If this part exploded due to an overheat. More...
 
Vector3 posBackup
 
List< PartresourceTargets = new List<Part>()
 
PartStates state = PartStates.IDLE
 
string vesselNamingDisplayName
 
string vesselNamingDisplayPriority
 

Static Protected Attributes

static Dictionary< Type,
ReflectedAttributes
reflectedAttributeCache = new Dictionary<Type, ReflectedAttributes>()
 

Properties

BaseActionList Actions [get]
 
bool CanFail [get, set]
 
int ClassID [get]
 
string ClassName [get]
 
DragCubeList DragCubes [get]
 
EffectList Effects [get]
 
BaseEventList Events [get]
 
BaseFieldList Fields [get]
 
bool hasStagingIcon [get]
 
bool HighlightActive [get, set]
 
Highlighter highlighter [get, set]
 
List< Renderer > HighlightRenderer [get, set]
 
bool isAttachable [get]
 
bool isAttached [get, set]
 Flag for whether the part is directly attached to another (it's not the same as parent != null because this is also true for root parts) More...
 
bool isCompund [get]
 
bool isControllable [get]
 flag for wether this part will receive an input feed (use this if reading FlightInputHandler.state directly) More...
 
bool isVesselEVA [get]
 Returns true if the Vessel this Part is a part of is an EVA Kerbal. - Includes null check if vessel is null returns false. More...
 
bool Landed [get]
 
Part localRoot [get]
 
List< ModuleAnimateGenericModuleAnimateGenerics [get]
 The ModuleAnimateGeneric modules for this part (if there are any). More...
 
PartModuleList Modules [get]
 
bool MouseOver [get]
 
MaterialPropertyBlock mpb [get]
 
bool NoAutoEVA [get]
 
Orbit orbit [get]
 
UIPartActionWindow PartActionWindow [get]
 
ReflectedAttributes PartAttributes [get, set]
 
bool PartTweakerSelected [get, set]
 Returns true if the current part selected is the tweaker "target anchor transform" point of a part, like the end point of a compound part. More...
 
PartValues PartValues [get]
 
bool RecurseHighlight [get, set]
 
PartResourceList Resources [get]
 This is the PartResourceList for the part. More...
 
Rigidbody Rigidbody [get]
 
Part RigidBodyPart [get]
 
bool ShieldedFromAirstream [get, set]
 
PartResourceList SimulationResources [get]
 This is the delta v simulation PartResourceList for the part. More...
 
bool Splashed [get]
 
PartStates State [get, set]
 
Vector3 WCoM [get]
 

Member Enumeration Documentation

Enumerator
Off 
Root 
Heaviest 
Grandparent 
ForceRoot 
ForceHeaviest 
ForceGrandparent 
Enumerator
DEFAULT 
CONIC 
CYLINDRICAL 
SPHERICAL 
CUBE 
NONE 
Enumerator
Disabled 
OnMouseOver 
AlwaysOn 
Enumerator
FULL 
NONE 
Enumerator
Never 
Editor 
Always 

Member Function Documentation

static void Part._CheckPartG ( Part  p)
inlinestatic
static void Part._CheckPartPressure ( Part  p)
inlinestatic
static void Part._CheckPartTemp ( Part  p)
inlinestatic
bool Part.activate ( int  currentStage,
Vessel  activeVessel 
)
inline
void Part.AddAttachNode ( ConfigNode  node)
inline
void Part.addChild ( Part  child)
inline
bool Part.AddCrewmember ( ProtoCrewMember  crew)
inline
bool Part.AddCrewmemberAt ( ProtoCrewMember  crew,
int  seatIndex 
)
inline
void Part.AddExposedThermalFlux ( double  kilowatts)
inline
void Part.AddForce ( Vector3d  vec)
inline

Adds force to the part's (or parent's up the tree) rb. NOTE: ForceMode == Force. If you want a different mode, convert to ForceMode.Force.

Parameters
vec
void Part.AddForceAtPosition ( Vector3d  vec,
Vector3d  pos 
)
inline

Adds force to the part's (or parent's up the tree) rb, at the specified position. NOTE: ForceMode == Force. If you want a different mode, convert to ForceMode.Force.

Parameters
vec
pos
void Part.AddImpulse ( Vector3d  vec)
inline

Adds force to the part's (or parent's up the tree) rb as an impulse (i.e. divides force by fixedDeltaTime

Parameters
vec
InternalModel Part.AddInternalPart ( ConfigNode  node)
inline
PartModule Part.AddModule ( string  moduleName,
bool  forceAwake = false 
)
inline
PartModule Part.AddModule ( ConfigNode  node,
bool  forceAwake = false 
)
inline
void Part.AddOnMouseDown ( OnActionDelegate  method)
inline
void Part.AddOnMouseEnter ( OnActionDelegate  method)
inline
void Part.AddOnMouseExit ( OnActionDelegate  method)
inline
void Part.AddPartModuleAdjusterList ( List< AdjusterPartModuleBase moduleAdjusters)
inline

Applies given module adjusters to the appropriate part modules

Template Parameters
adjusterModulesList of module adjusters to apply
PartResource Part.AddResource ( ConfigNode  node)
inline

Add a PartResource to this Part from a ConfigNode.

Parameters
node
Returns
Callback<IAirstreamShield> Part.AddShield ( IAirstreamShield  shd)
inline
void Part.AddSkinThermalFlux ( double  kilowatts)
inline
void Part.AddThermalFlux ( double  kilowatts)
inline
void Part.AddTorque ( Vector3d  vec)
inline

Adds given torque to the part's (or parent's up the tree) rb. NOTE: ForceMode == Force. If you want a different mode, convert to ForceMode.Force.

Parameters
vec
void Part.AimCamera ( )
inline
bool Part.AllowAutoStruts ( )
inline
bool Part.AlreadyProcessedRequest ( int  requestID)
inline
void Part.ApplyRigidAttachment ( )
inline
void Part.Awake ( )
inline

< set up modules n stuff

< set up human readable info

< set up Resources

< Set up effects

< Set up drag cube list

< Setup up the part highlighter

< find an airlock node (if any) needs to be in editor too for Engineer's Report purposes

virtual bool Part.CanCrossfeed ( Part  target,
string  resName,
ResourceFlowMode  flow = ResourceFlowMode.NULL 
)
inlinevirtual

Can this Part Crossfeed a Resource between itself and another part?

Parameters
targetThe Target Part
resNameThe Resource name for the Resource
flowThe FlowMode to use.
Returns
virtual bool Part.CanCrossfeed ( Part  target,
int  resourceID,
ResourceFlowMode  flow = ResourceFlowMode.NULL 
)
inlinevirtual

Can this Part Crossfeed a Resource between itself and another part?

Parameters
targetThe Target Part
resourceIDThe Resource ID for the Resource
flowThe FlowMode to use.
Returns
True if the part can crossfeed the Resource. Otherwise False.
void Part.ChangeResourcePriority ( int  offset)
inline
void Part.CheckBodyLiftAttachment ( )
inline
bool Part.CheckCollision ( Collision  c)
inline
bool Part.checkLanded ( )
inline
void Part.checkPermanentLandedAt ( )
inline
bool Part.checkSplashed ( )
inline
void Part.CheckTransferDialog ( )
inline
void Part.CleanSymmetryReferences ( )
inline
void Part.CleanSymmetryVesselReferences ( )
inline
void Part.CleanSymmetryVesselReferencesRecursively ( )
inline
void Part.clearParent ( )
inline

called by the editor when the selected part is cloned. Use this in stead of setParent(null) to avoid invoking GameEvents.onPartRemove in cases where you are not actually removing a part from the ship.

void Part.Couple ( Part  tgtPart)
inline

< also reset all attached and connected flags on both vessels

< update original positions and rotations in relation to the new vessel root

< set the target part as parent for old vessel

< recursively add the parts to the new vessel.

< promote old vessel to a proper vessel again

< remove the old vessel definition off the root part

< update landed status, just to be on the safe side (vessel now points to the new one)

< reset all collision ignores for this vessel

void Part.CreateAttachJoint ( AttachModes  mode)
inline
void Part.CreateInternalModel ( )
inline
void Part.CycleAutoStrut ( )
inline
void Part.deactivate ( )
inline
void Part.decouple ( float  breakForce = 0.0f)
inline

< this part just became a new vessel now

< Generate fresh UUID.

< inherit the old vessel's control state, so if we decouple a live engine for instance, it'll stay throttled up

void Part.DemoteToPhysicslessPart ( )
inline

This will demote a Physical part to a physicsless part. Use with Care.

void Part.DespawnIVA ( )
inline
void Part.Die ( )
inline

< if this part was the one in ground contact, tell the vessel to check if it's still landed (through other parts maybe)

< or if game parameters allow respawning, set them as "missing" instead.

< Clean up plugin data

< clear off the part object after everything else is done (unless it is the vessel root, in which case the vessel will handle it)

void Part.disconnect ( bool  controlledSeparation = false)
inline
virtual bool Part.DrainFuel ( float  amount)
inlinevirtual
string Part.drawStats ( )
inline
void Part.Effect ( string  effectName,
int  transformIdx = -1 
)
inline
void Part.Effect ( string  effectName,
float  effectPower,
int  transformIdx = -1 
)
inline
void Part.explode ( )
inline
void Part.explode ( float  offset)
inline

< TODO: Wait for FXMonger to finish. (Causes infinite loop if done in FXMonger)

AttachNode Part.FindAttachNode ( string  nodeId)
inline

returns an attachment node that matches the given id name. (a node's id is the third section of it's definition in the cfg, or for srfAttach nodes: 'srfAttach')

Parameters
nodeIdThe id to look for
Returns
A reference to the attachNode, or null if none is found
AttachNode Part.FindAttachNodeByPart ( Part  connectedPart)
inline
AttachNode [] Part.FindAttachNodes ( string  partialNodeId)
inline

returns an array of attachNodes, whose ids CONTAIN the given id string. (use this one to get multiple nodes at once, when they have similar ids, like node_stack_top1, node_stack_top2...)

Parameters
partialNodeIdThe string to search for in the node ids
Returns
An array of all nodes found in the search, or null if none is found
Part Part.FindChildPart ( string  childName)
inline
Part Part.FindChildPart ( string  childName,
bool  recursive 
)
inline
static Part Part.FindChildPart ( Part  parent,
string  childName 
)
inlinestatic
T Part.FindChildPart< T > ( )
inline
Type Constraints
T :Part 
T Part.FindChildPart< T > ( bool  recursive)
inline
Type Constraints
T :Part 
static T Part.FindChildPart< T > ( Part  parent)
inlinestatic
Type Constraints
T :Part 
T [] Part.FindChildParts< T > ( )
inline
Type Constraints
T :Part 
T [] Part.FindChildParts< T > ( bool  recursive)
inline
Type Constraints
T :Part 
static void Part.FindChildParts< T > ( Part  parent,
List< T >  tList 
)
inlinestatic
Type Constraints
T :Part 
virtual bool Part.FindFuel ( Part  source,
List< Part fuelSources,
uint  reqId 
)
inlinevirtual

< if there is a fuel lookup target defined, use it instead of the default fuel paths

< check any neighbour nodes that are attached

FXGroup Part.findFxGroup ( string  groupID)
inline
static Transform Part.FindHeirarchyTransform ( Transform  parent,
string  childName 
)
inlinestatic
static Transform Part.FindHeirarchyTransformByLayer ( Transform  parent,
string  layerName 
)
inlinestatic

Finds a transform that uses a given layer inside a given transform

Parameters
layerNamethe name of the layer of search for
Returns
static void Part.FindHeirarchyTransforms ( Transform  parent,
string  childName,
List< Transform >  tList 
)
inlinestatic
static void Part.FindHeirarchyTransformsByTag ( Transform  parent,
string  tag,
List< Transform >  tList 
)
inlinestatic

Finds transforms in the hierarchy of a given parent by tag

Parameters
parent
tag
tList
Animation Part.FindModelAnimator ( string  animatorName,
string  clipName 
)
inline
static Animation Part.FindModelAnimator ( Transform  modelTransform,
string  animatorName,
string  clipName 
)
inlinestatic
Animation Part.FindModelAnimator ( string  clipName)
inline
Animation [] Part.FindModelAnimators ( string  clipName)
inline
Animation [] Part.FindModelAnimators ( )
inline
T Part.FindModelComponent< T > ( )
inline
Type Constraints
T :Component 
T Part.FindModelComponent< T > ( string  childName)
inline
Type Constraints
T :Component 
static T Part.FindModelComponent< T > ( Transform  parent,
string  childName 
)
inlinestatic
Type Constraints
T :Component 
List<T> Part.FindModelComponents< T > ( )
inline
Type Constraints
T :Component 
List<T> Part.FindModelComponents< T > ( string  childName)
inline
Type Constraints
T :Component 
static void Part.FindModelComponents< T > ( Transform  parent,
string  childName,
List< T >  tList 
)
inlinestatic
Type Constraints
T :Component 
List<MeshRenderer> Part.FindModelMeshRenderersCached ( )
inline

Find all Model MeshRenderer Components on the part. Use the previous cached results if available

Returns
List of MeshRenderer Components on the part
List<Renderer> Part.FindModelRenderersCached ( )
inline

Find all Model Renderer Components on the part. Use the previous cached results if available

Returns
List of MeshRenderer Components on the part
List<SkinnedMeshRenderer> Part.FindModelSkinnedMeshRenderersCached ( )
inline

Find all Model SkinnedMeshRenderer Components on the part. Use the previous cached results if available

Returns
List of MeshRenderer Components on the part
Transform Part.FindModelTransform ( string  childName)
inline
Transform Part.FindModelTransformByLayer ( string  layerName)
inline

Finds a model transform that uses a given layer

Parameters
layerNamethe name of the layer of search for
Returns
Transform [] Part.FindModelTransforms ( string  childName)
inline
Transform [] Part.FindModelTransformsWithTag ( string  tag)
inline

Finds model transforms that have a given tag

Parameters
tag
Returns
T Part.FindModuleImplementing< T > ( )
inline

Returns the first ocurrence of a module in this part, if any

Template Parameters
TPartModule to search for
Returns
Reference to the PartModule
Type Constraints
T :class 
List<T> Part.FindModulesImplementing< T > ( )
inline

Returns all modules of the given part type

Template Parameters
T
Returns
Type Constraints
T :class 
void Part.FindNonPhysicslessChildren ( ref List< Part parts)
inline
Part Part.FindNonPhysicslessParent ( )
inline
T Part.FindParentModuleImplementing< T > ( )
inline

Returns the first occurrence of a module in this Part's parent tree, if any.

Template Parameters
T
Returns
Type Constraints
T :class 
AttachNode Part.FindPartThroughNodes ( Part  tgtPart,
Part  src = null 
)
inline

Finds the attachnode (if any) that leads to the given part

Parameters
tgtPart
Returns
static Transform Part.FindTransformInChildrenExplicit ( Transform  parent,
Transform  find 
)
inlinestatic
void Part.FixedUpdate ( )
inline
void Part.force_activate ( )
inline
void Part.force_activate ( bool  playFX)
inline
void Part.freeze ( )
inline
static Part Part.FromGO ( GameObject  obj)
inlinestatic
void Part.GainCameraAim ( )
inline
static Component Part.GetComponentUpwards ( string  type,
GameObject  obj 
)
inlinestatic
static T Part.GetComponentUpwards< T > ( GameObject  obj)
inlinestatic
Type Constraints
T :Component 
void Part.GetConnectedResourceTotals ( int  resourceID,
out double  amount,
out double  maxAmount,
bool  pulling = true 
)
inline

Get the Connected Resource totals. Obeys resource crossfeed rules.

Parameters
resourceIDThe id of the resource
amountThe amount of the resource available to this Part
maxAmountThe max amount of the resource available to this Part (total capacity)
pullingSet to false if wanting how much available space there is. Default is true: Get how much of the actual resource is available.
virtual void Part.GetConnectedResourceTotals ( int  resourceID,
ResourceFlowMode  flowMode,
out double  amount,
out double  maxAmount,
bool  pulling = true 
)
inlinevirtual

Get the Connected Resource totals.

Parameters
resourceIDThe id of the resource
flowModeResourceFlowMode to use (overrides default resource flowmode)
amountThe amount of the resource available to this Part
maxAmountThe max amount of the resource available to this Part (total capacity)
pullingSet to false if wanting how much available space there is. Default is true: Get how much of the actual resource is available.
void Part.GetConnectedResourceTotals ( int  resourceID,
out double  amount,
out double  maxAmount,
double  threshold,
bool  pulling = true 
)
inline

Get the Connected Resource totals.

Parameters
resourceIDThe id of the resource
amountThe amount of the resource available to this Part
maxAmountThe max amount of the resource available to this Part (total capacity)
thresholdThe threshold amount.
pullingSet to false if wanting how much available space there is. Default is true: Get how much of the actual resource is available.
virtual void Part.GetConnectedResourceTotals ( int  resourceID,
ResourceFlowMode  flowMode,
out double  amount,
out double  maxAmount,
double  threshold,
bool  pulling = true 
)
inlinevirtual

Get the Connected Resource totals.

Parameters
resourceIDThe id of the resource
flowModeResourceFlowMode to use (overrides default resource flowmode)
amountThe amount of the resource available to this Part
maxAmountThe max amount of the resource available to this Part (total capacity)
thresholdThe threshold amount.
pullingSet to false if wanting how much available space there is. Default is true: Get how much of the actual resource is available.
virtual void Part.GetConnectedResourceTotals ( int  resourceID,
ResourceFlowMode  flowMode,
bool  simulate,
out double  amount,
out double  maxAmount,
double  threshold,
bool  pulling = true 
)
inlinevirtual

Get the Connected Resource totals.

Parameters
resourceIDThe id of the resource
flowModeResourceFlowMode to use (overrides default resource flowmode)
simulateIf true will use the SimulationResources
amountThe amount of the resource available to this Part
maxAmountThe max amount of the resource available to this Part (total capacity)
thresholdThe threshold amount.
pullingSet to false if wanting how much available space there is. Default is true: Get how much of the actual resource is available.
int Part.GetCrewCountOfExperienceEffect< T > ( )
inline

Will return a count of the number of crew on board the part that have the experience effect that is passed in.

Template Parameters
TExperience.ExperienceEffect you want a crew count of
Returns
integer count value
Type Constraints
T :Experience.ExperienceEffect 
List<ProtoCrewMember> Part.GetCrewOfExperienceEffect< T > ( )
inline

Will return a list of the crew on board the part that have the experience effect that is passed in.

Template Parameters
TExperience.ExperienceEffect you want the returned list to contain
Returns
A list of ProtoCrewMember type
Type Constraints
T :Experience.ExperienceEffect 
static uint Part.getFuelReqId ( )
inlinestatic
Part Part.GetMassivePart ( Part  start,
out Part  lastPart,
out AttachNode  nodeToParent,
out AttachNode  nodeFromParent,
out bool  srfAttached,
params Part[]  excluded 
)
inline

< Do the same for child parts

< Cache the result (lasts only for the one tick, minor improvement to performance)

float Part.GetModuleCosts ( float  defaultCost,
ModifierStagingSituation  sit = ModifierStagingSituation.CURRENT 
)
inline

Returns the sum of cost modifications from IPartCostModifier modules.

Returns
float Part.GetModuleMass ( float  defaultMass,
ModifierStagingSituation  sit = ModifierStagingSituation.CURRENT 
)
inline

Returns the sum of mass modifications from IPartMassModifier modules.

Returns
Vector3 Part.GetModuleSize ( Vector3  defaultSize,
ModifierStagingSituation  sit = ModifierStagingSituation.CURRENT 
)
inline

Returns the sum of size modifications from IPartSizeModifier modules.

Returns
PartModule.StartState Part.GetModuleStartState ( )
inline
virtual Collider [] Part.GetPartColliders ( )
inlinevirtual

Reimplemented in CompoundPart.

virtual Renderer [] Part.GetPartRenderers ( )
inlinevirtual
static void Part.GetPartsOutTo ( Part  part,
HashSet< Part parts,
int  maxLinks 
)
inlinestatic
float Part.GetPhysicslessChildMass ( )
inline
virtual Part Part.GetReferenceParent ( )
inlinevirtual

Reimplemented in CompoundPart.

virtual Transform Part.GetReferenceTransform ( )
inlinevirtual

Reimplemented in CompoundPart.

static ReflectedAttributes Part.GetReflectedAttributes ( Type  partModuleType)
inlinestaticprotected
float Part.GetResourceMass ( )
inline

Get the Mass of all Resources in the part.

Returns
float Part.GetResourceMass ( bool  simulate)
inline

Get the Mass of all Resources in the part.

Parameters
simulateIf true will get the mass of SimulationResources.
Returns
float Part.GetResourceMass ( out float  thermalMass)
inline

Get the Mass of all Resources in the part.

Parameters
thermalMassReturns the thermal mass of the Resources as well.
Returns
float Part.GetResourceMass ( out double  thermalMass)
inline

Get the Mass of all Resources in the part.

Parameters
thermalMassReturns the thermal mass of the Resources as well.
Returns
virtual int Part.GetResourcePriority ( )
inlinevirtual
Part Part.getSymmetryCounterPart ( int  index)
inline
void Part.HandleCollision ( Collision  c)
inline

< first we consider impact speed only. This way very light objects just touching heavy ones won't go 'pop'

bool Part.HasAutoStrutDefined ( )
inline

Returns true if there are autostruts defined.

Returns
bool Part.HasFreePivot ( )
inline
bool Part.hasIndirectChild ( Part  tgtPart)
inline

Returns true if the target part is in the direct hierarchy of this part.

Parameters
tgtPartThe part to search for
bool Part.hasIndirectParent ( Part  tgtPart)
inline

Returns true if the target part is in the direct hierarchy of this part.

Parameters
tgtPartThe part to search for
bool Part.HasModuleImplementing< T > ( )
inline

Tests whether this Part has a PartModule of this type

Template Parameters
TPartmodule type to search for
Returns
True if it is
Type Constraints
T :class 
bool Part.HasValidContractObjective ( string  objectiveType)
inline
void Part.HeatGaugeUpdate ( )
inline
void Part.Highlight ( bool  active)
inline

Manually highlights the part using default hightlighting color

Parameters
activeTurn hightlight on or off.
void Part.Highlight ( Color  highlightColor)
inline

Manually highlights the part.

Parameters
highlightColorThe highlight color. Use Color.black to unhighlight
void Part.HighlightRecursive ( bool  active)
inline

Recursively highlights the part and it's children (to a lesser degree)

Parameters
activeTurn hightlight on or off.
void Part.HighlightRecursive ( Color  highlightColor)
inline

Recursively highlights the part and it's children (to a lesser degree)

Parameters
highlightColorThe highlight color. Use Color.black to unhighlight
void Part.InitializeEffects ( )
inline
void Part.InitializeModules ( )
inline
bool Part.isAirIntake ( out ModuleResourceIntake  intake)
inline

Is this Part an Air Intake or not?

Parameters
intakeReturns the found ModuleResourceIntake if found or null
Returns
True if it is an air intake, false otherwise.
bool Part.isAnchoredDecoupler ( out ModuleAnchoredDecoupler  moduleAnchoredDecoupler)
inline

Is this Part an AnchoredDecoupler or not?

Parameters
moduleAnchoredDecouplerReturns the found ModuleAnchoredDecoupler if found or null
Returns
True if it is an anchored decoupler, false otherwise.
bool Part.isAntenna ( out ModuleDeployableAntenna  antenna)
inline

Is this Part an Antenna or not?

Parameters
antennaReturns the found ModuleDeployableAntenna if found or null
Returns
True if it is an antenna, false otherwise.
bool Part.isBaseServo ( out BaseServo  servo)
inline

Is this part a Base Servo or not?

Parameters
servoReference to the base servo module.
Returns
True if it is a base servo, false otherwise.
bool Part.isCargoPart ( )
inline

Is this Part a Cargo Part or not?

Returns
True if it is a cargo part, false otherwise.
bool Part.isChildOfRoboticRotor ( )
inline

Is this Part a Child of a Part that is a Robotic Rotor or not? (A Parent implements ModuleRoboticServoRotor).

Returns
True if it is
bool Part.isControlSurface ( )
inline

Is this Part a Control Surface (Implements ModuleControlSurface).

Returns
True if it is
bool Part.isControlSurface ( out ModuleControlSurface  controlSurface)
inline

Is this Part a Control Surface (Implements ModuleControlSurface).

Parameters
controlSurfaceThe control surface module
Returns
True if it is
bool Part.isDecoupler ( out ModuleDecouple  moduleDecoupler)
inline

Is this Part a Decoupler or not? Does not include AnchoredDecoupler. Use isAnchoredDecoupler() to check.

Parameters
dockingPortReturns the found ModuleDecouple if found or null
Returns
True if it is a decoupler, false otherwise.
bool Part.isDockingPort ( out ModuleDockingNode  dockingPort)
inline

Is this Part a dockingPort or not?

Parameters
dockingPortReturns the found ModuleDockingNode if found or null
Returns
True if it is a docking port, false otherwise.
bool Part.isEngine ( )
inline

Is this Part a ModuleEngines or not?

Returns
bool Part.isEngine ( out List< ModuleEngines engines)
inline

Does this Part contain a ModuleEngines?

Parameters
enginesA list of ModuleEngines found on part.
Returns
bool Part.isFairing ( )
inline

Is this Part a Fairing or not?

Returns
True if it is a fairing, false otherwise.
bool Part.isGenerator ( out ModuleGenerator  generator)
inline

Is this Part a Generator or not?

Parameters
generatorReturns the found ModuleGenerator if found or null
Returns
True if it is a generator, false otherwise.
bool Part.isGroundDeployable ( )
inline

Is this Ground Deployable Part or not?

Returns
True if it is a ground deloyable part, false otherwise.
bool Part.isInventoryPart ( )
inline

Is this Part a Cargo Inventory Part or not?

Returns
True if it is a cargo inventory part, false otherwise.
bool Part.isKerbalEVA ( )
inline

Is this Part a an EVA Kerbal?

Returns
True if it is a kerbal EVA part, false otherwise.
bool Part.isKerbalSeat ( )
inline

Is this Part a Kerbal Seat or not?

Returns
True if it is a parachute, false otherwise.
bool Part.isLaunchClamp ( )
inline

Is this Part a LaunchClamp or not?

Returns
True if it is a launch clamp, false otherwise.
bool Part.isParachute ( )
inline

Is this Part a Parachute or not?

Returns
True if it is a parachute, false otherwise.
bool Part.isRadiator ( out ModuleDeployableRadiator  radiator)
inline

Is this Part a Radiator or not?

Parameters
radiatorReturns the found ModuleDeployableRadiator if found or null
Returns
True if it is a radiator, false otherwise.
bool Part.isRobotic ( )
inline

Is this Part a Robotic Part or not?

Returns
bool Part.isRoboticController ( )
inline

Is this Part a Robotics Controller or not

Returns
bool Part.isRoboticController ( out ModuleRoboticController  controller)
inline

Is this Part a Robotics Controller or not?

Parameters
servoReference to the Robotics Controller module.
Returns
True if it is a Robotics Controller, false otherwise.
bool Part.isRoboticHinge ( )
inline

Is this Part a Robotic Hinge Part or not? (Implements ModuleRoboticServoHinge).

Returns
True if it is
bool Part.isRoboticPiston ( )
inline

Is this Part a Robotic Piston Part or not? (Implements ModuleRoboticServoPiston).

Returns
True if it is
bool Part.isRoboticRotationServo ( )
inline

Is this Part a Robotic RotationServo Part or not? (Implements ModuleRoboticServoRotationServo).

Returns
True if it is
bool Part.isRoboticRotor ( )
inline

Is this Part a Robotic Rotor Part or not? (Implements ModuleRoboticServoRotor).

Returns
True if it is
bool Part.isSolarPanel ( out ModuleDeployableSolarPanel  solarPanel)
inline

Is this Part a Solar Panel or not?

Parameters
solarPanelReturns the found ModuleDeployableSolarPanel if found or null
Returns
True if it is a solar panel, false otherwise.
bool Part.isSymmetryCounterPart ( Part  cPart)
inline
bool Part.isTrackingShipConstructIDChanges ( out List< IShipConstructIDChanges modules)
inline

Is this Part tracking ID changes in Ship Construct in any modules

Parameters
modulesmodules that are tracking it
Returns
True if it is
bool Part.IsUnderConstructionWeightLimit ( )
inline

Checks if the parts Weight is below the construction limit (PhysicsGlobals.ConstructionWeightLimit)

Returns
void Part.LandedCollisionChecks ( Collision  c)
inline
virtual void Part.LateUpdate ( )
inlinevirtual

Reimplemented in CompoundPart.

void Part.LoadEffects ( ConfigNode  node)
inline
PartModule Part.LoadModule ( ConfigNode  node,
ref int  moduleIndex 
)
inline
void Part.LoseCameraAim ( )
inline
void Part.ModulesBeforePartAttachJoint ( )
inline
void Part.ModulesOnActivate ( )
inline
void Part.ModulesOnDeactivate ( )
inline
void Part.ModulesOnFixedUpdate ( )
inline
void Part.ModulesOnStart ( )
inline
void Part.ModulesOnStartFinished ( )
inline
void Part.ModulesOnUpdate ( )
inline
static int Part.NewRequestID ( )
inlinestatic
delegate void Part.OnActionDelegate ( Part  p)
virtual void Part.onActiveFixedUpdate ( )
inlineprotectedvirtual

called on physics update, when the part is active. use to update active parts, like engines

virtual void Part.onActiveUpdate ( )
inlineprotectedvirtual

called on regular update, when the part is active.

void Part.onAttach ( Part  parent,
bool  first = true 
)
inline

Called by editor logic when the part is attached to the ship. Propagates childward. (parent hierarchy is followed)

Parameters
parent
void Part.OnAttachFlight ( Part  parent)
inline

Attaches this part to the parent passed in as a parameter.

Parameters
parent
virtual void Part.onBackup ( )
inlinevirtual

Called whenever a backup snapshot is created from the ship

void Part.OnCollisionEnter ( Collision  c)
inline

< before handling the collision, check if this collider doesn't belong to a physicsless part

< if the vessel is ignoring collisions then so must the part

void Part.OnCollisionExit ( Collision  c)
inline
void Part.OnCollisionStay ( Collision  c)
inline
virtual void Part.OnConstructionModeFixedUpdate ( )
inlinevirtual

This method will be called when in EVA Construction mode and this part is disabled (when it is not attached to a vessel) every FixedUpdate(). It will call the same named method on every PartModule on the part which can be override by any PartModule.

virtual void Part.OnConstructionModeUpdate ( )
inlinevirtual

This method will be called when in EVA Construction mode and this part is disabled (when it is not attached to a vessel) every Update(). It will call the same named method on every PartModule on the part which can be override by any PartModule.

Reimplemented in CompoundPart.

void Part.OnCopy ( Part  original,
bool  asSymCounterpart 
)
inline

This method is called on a clone/copied Part right after it's been created from another part in the editor scene. It copies the resources, their amounts. It calls Copy method on all the PartModules on this part. It then copies/sets the variant and calls OnCopy on all children Parts on this part.

Parameters
originalA reference to the original Part this part was copied from.
asSymCounterpartTrue if the part being copied is a symmetry counterpart.
virtual void Part.onCopy ( Part  original,
bool  asSymCounterpart 
)
inlineprotectedvirtual

Called when the part is instantiated as a copy, through Alt+Copy or symmetry

Reimplemented in CompoundPart.

virtual void Part.onCtrlUpd ( FlightCtrlState  s)
inlineprotectedvirtual

propagates downwards from the active command pod. will reach every part that is still connected

Parameters
san object containing the state of all flight controls
virtual void Part.onDecouple ( float  breakForce)
inlineprotectedvirtual

called when the part is detached from the ship assembly (breakForce > 0 means the part was broken off)

Parameters
breakForce
void Part.OnDelete ( )
inline
void Part.onDetach ( bool  first = true)
inline

Called by editor logic when the part is pulled off the ship. Propagates childward

void Part.OnDetachFlight ( )
inline

Detaches a part from a vessel during Flight Scene. Method quits if loaded scene is not Flight or if it has at least 1 child part.

virtual void Part.onDisconnect ( )
inlineprotectedvirtual

called when a parent of this part was detached from the ship

virtual void Part.OnDrawStats ( )
inlinevirtual
virtual void Part.onEditorEndTweak ( )
inlinevirtual

Called when the part finishes getting tweaked in position/rotation on the editor (Mainly for struts).

Reimplemented in CompoundPart.

virtual void Part.onEditorStartTweak ( )
inlinevirtual

Called when the part starts getting tweaked in position/rotation on the editor (Mainly for struts).

Reimplemented in CompoundPart.

virtual void Part.onEditorUpdate ( )
inlineprotectedvirtual

called on physics update while the game is at the VAB.

Reimplemented in CompoundPart.

virtual void Part.onFlightStart ( )
inlineprotectedvirtual

called when entering flight mode.

virtual void Part.onFlightStartAtLaunchPad ( )
inlineprotectedvirtual

called when entering flight mode as a new flight (on the launch pad).

virtual void Part.onFlightStateLoad ( Dictionary< string, KSPParseable parsedData)
inlinevirtual

Called when the flight scene is being loaded. Use to retrieve saved module data.

virtual void Part.onFlightStateSave ( Dictionary< string, KSPParseable partDataCollection)
inlinevirtual

Called when the state of the flight scene is being saved. Use to save module data. Add KSPParseable objects to the partDataCollection to have them saved. (use descriptive, unique names)

virtual void Part.onGamePause ( )
inlineprotectedvirtual

called when the game is paused. use to store values and resume them later

virtual void Part.onGameResume ( )
inlineprotectedvirtual

called when the game is resumed back from a pause state. use to restore values saved in onGamePause

virtual string Part.OnGetStats ( )
inlinevirtual

Override to return part-specific stats as a string

virtual void Part.OnInventoryModeDisable ( )
inlinevirtual

This method will be called when this part is first disabled (when it is not attached to a vessel) when created in Inventory/Construction mode. It will call the same named method on every PartModule on the part which can be override by any PartModule.

Reimplemented in CompoundPart.

virtual void Part.OnInventoryModeEnable ( )
inlinevirtual

This method will be called when this part is first enabled (when it is attached to a vessel) when created in Inventory/Construction mode. It will call the same named method on every PartModule on the part which can be override by any PartModule.

Reimplemented in CompoundPart.

virtual void Part.onJointDisable ( )
inlineprotectedvirtual
virtual void Part.onJointReset ( )
inlineprotectedvirtual
void Part.OnLiftOff ( )
inline
void Part.OnLoad ( )
inline
virtual void Part.OnLoad ( ConfigNode  node)
inlinevirtual

Reimplemented in CompoundPart.

virtual void Part.onPack ( )
inlineprotectedvirtual
virtual bool Part.onPartActivate ( )
inlineprotectedvirtual

called when the part is activated

virtual void Part.onPartAttach ( Part  parent)
inlineprotectedvirtual

called when the part is attached to another (in the editor). When this is called all needed attachment operations are completed.

Parameters
parentthe part it's been attached to

Reimplemented in CompoundPart.

virtual void Part.onPartAwake ( )
inlineprotectedvirtual

called when the part is first instantiated. Use to overwrite part parameters if needed. Will be called at loading time, and also at each new instance.

Reimplemented in CompoundPart.

virtual void Part.OnPartCreatedFomInventory ( ModuleInventoryPart  moduleInventoryPart)
inlinevirtual

This method is called when a part is being taken out from a slot while being in EVAConstruction mode.

Parameters
moduleInventoryPartThe inventory part module this part is being drawn from.

Reimplemented in CompoundPart.

virtual void Part.onPartDeactivate ( )
inlineprotectedvirtual

called when the active part is deactivated, like an engine when it runs out of fuel

virtual void Part.onPartDelete ( )
inlineprotectedvirtual

called when the part is manually deleted on the VAB

virtual void Part.onPartDestroy ( )
inlineprotectedvirtual

called when the part's gameObject is destroyed. use to remove any listeners, or destroy components

Reimplemented in CompoundPart.

virtual void Part.onPartDetach ( )
inlineprotectedvirtual

called when the part is detached from the ship (in the editor). When this is called all needed detachment operations are completed.

Reimplemented in CompoundPart.

virtual void Part.onPartExplode ( )
inlineprotectedvirtual

called when the part explodes.

virtual void Part.onPartFixedUpdate ( )
inlineprotectedvirtual

called on every physics update. use to update passive parts that need to apply forces or use much physics, like winglets or RCS.

Reimplemented in CompoundPart.

void Part.OnPartJointBreak ( float  breakForce)
inline
virtual void Part.onPartLiftOff ( )
inlineprotectedvirtual
virtual void Part.onPartLoad ( )
inlineprotectedvirtual

called only once, when the part is first loaded into the game. Use to create components, and do stuff that only needs to be done once.

virtual void Part.onPartSplashdown ( )
inlineprotectedvirtual
virtual void Part.onPartStart ( )
inlineprotectedvirtual

called when the unity Start() method is called.

virtual void Part.onPartTouchdown ( )
inlineprotectedvirtual
virtual void Part.onPartUpdate ( )
inlineprotectedvirtual

Called once per frame. use to update passive parts that don't affect physics, like radiators or solar panels

void Part.OnPointerClick ( PointerEventData  eventData)
inline
virtual void Part.OnSave ( ConfigNode  node)
inlinevirtual

Reimplemented in CompoundPart.

void Part.OnSplashDown ( )
inline
virtual void Part.onStartComplete ( )
inlineprotectedvirtual

called at the end of the start method in all scenes. In flight, this is after rigidbody initialization.

Reimplemented in CompoundPart.

void Part.OnTouchDown ( )
inline
virtual void Part.onUnpack ( )
inlineprotectedvirtual
void Part.OnWasCopied ( Part  newPart,
bool  asSymCounterpart 
)
inline

This method is called right after a Part is about to be copied in the editor scene. Calls OnWasCopied on all PartModules on this part. Calls OnWasCopied on all children Parts on this part.

Parameters
newPartThe new or copy part that was created from this part.
asSymCounterpartTrue if the part being copied is a symmetry counterpart.
virtual void Part.onWasCopied ( Part  copyPart,
bool  asSymCounterpart 
)
inlineprotectedvirtual

Called when the part was copied, through Alt+Copy or symmetry

void Part.OnWillBeCopied ( bool  asSymCounterpart)
inline

This method is called right before a Part is about to be copied in the editor scene. Calls OnWillBeCopied on all PartModules on this part. Calls OnWillBeCopied on all children Parts on this part.

Parameters
asSymCounterpartTrue if the part being copied is a symmetry counterpart.
virtual void Part.onWillBeCopied ( bool  asSymCounterpart)
inlineprotectedvirtual

Called when the part is about to be copied, through Alt+Copy or symmetry

bool Part.OnWillBeMirrored ( ref Quaternion  rotation,
AttachNode  selPartNode,
Part  partParent 
)
inline

This is called in the Editor scene when a symmetry copy of a part is being positioned. Only called on the symmetry parts and only when symmetry mode is set to Mirror. It allows the mirror rotation to be changed and returned before being applied to the symmetry copy part. It will call OnWillBeMirrored on all Part Modules on the Part. It does NOT call on children Parts.

Parameters
rotationThe current calculated rotation. Will be updated if method returns true.
selPartNodeThe attachnode.
partParentThe part that will become this part's parent.
Returns
True if the rotation was changed. Otherwise will return false.
void Part.Pack ( )
inline

< disconnected parts are sent to another layer, where they don't collide with other parts on the same layer

bool Part.PartCanBeDetached ( )
inline
bool Part.PartCanBeOffset ( )
inline
bool Part.PartCanBeRotated ( )
inline
void Part.PartRepair ( )
inline

Removes all the adjusters that can be repaired on this part.

static Vector3 Part.PartToVesselSpaceDir ( Vector3  dir,
Part  p,
Vessel  v,
PartSpaceMode  space 
)
inlinestatic

Transform a direction from a part's local space to vessel-relative space

static Vector3 Part.PartToVesselSpacePos ( Vector3  pos,
Part  p,
Vessel  v,
PartSpaceMode  space 
)
inlinestatic

Transform a point from a part's local space to vessel-relative space

static Quaternion Part.PartToVesselSpaceRot ( Quaternion  rot,
Part  p,
Vessel  v,
PartSpaceMode  space 
)
inlinestatic

Transform a rotation from a part's local space to vessel-relative space

void Part.PromoteToPhysicalPart ( )
inline
void Part.propagateControlUpdate ( FlightCtrlState  st)
inline

< let the part do something with the new control state

< and forward it to it's children

IEnumerator Part.RecheckShielding ( )
inlineprotected
void Part.RefreshHighlighter ( )
inline
void Part.RegisterCrew ( )
inline
void Part.ReleaseAutoStruts ( )
inline
void Part.RelinkPrefab ( )
inline

< will only be true during part compilation

void Part.removeChild ( Part  child)
inline
void Part.RemoveCrewmember ( ProtoCrewMember  crew)
inline
void Part.RemoveFromSymmetry ( )
inline

Remove this part from symmetry partners and clear its symmetry

Only applies for robotic parts currently

void Part.RemoveModule ( PartModule  module)
inline
void Part.RemoveModules ( )
inline
void Part.RemoveOnMouseDown ( OnActionDelegate  method)
inline
void Part.RemoveOnMouseEnter ( OnActionDelegate  method)
inline
void Part.RemoveOnMouseExit ( OnActionDelegate  method)
inline
void Part.RemovePartModuleAdjusterList ( List< AdjusterPartModuleBase moduleAdjusters)
inline

Removes the given adjusters

Template Parameters
moduleAdjustersList of module adjusters to remove
bool Part.RemoveResource ( PartResource  res)
inline

Remove a Resource from the part.

Parameters
res
Returns
bool Part.RemoveResource ( string  rName)
inline

Remove a Resource from the part.

Parameters
rName
Returns
bool Part.RemoveResource ( int  resID)
inline

Remove a Resource from the part.

Parameters
resID
Returns
void Part.RemoveSameVesselInteraction ( KSPActionParam  act)
inline

Disable the SameVesselCollision bool.

void Part.RemoveShield ( IAirstreamShield  shd)
inline
virtual bool Part.RequestFuel ( Part  source,
float  amount,
uint  reqId 
)
inlinevirtual

< if there is a fuel lookup target defined, use it instead of the default fuel paths

< check any neighbour nodes that are attached

virtual bool Part.RequestRCS ( float  amount,
int  earliestStage 
)
inlinevirtual
virtual float Part.RequestResource ( int  resourceID,
float  demand 
)
inlinevirtual

Deprecated, please use double RequestResource(int, double). Using this may cause rounding issues with fuel flow

virtual float Part.RequestResource ( string  resourceName,
float  demand 
)
inlinevirtual

Deprecated, please use double RequestResource(string, double). Using this may cause rounding issues with fuel flow

virtual double Part.RequestResource ( int  resourceID,
double  demand 
)
inlinevirtual

Request a Resource. Obeys resource flow mode.

Parameters
resourceIDResource ID being requested
demandThe amount being requested
Returns
The amount that was taken
virtual double Part.RequestResource ( int  resourceID,
double  demand,
bool  simulate 
)
inlinevirtual

Request a Resource. Obeys resource flow mode.

Parameters
resourceIDResource ID being requested
demandThe amount being requested
simulateIf true will use the SimulationResources
Returns
The amount that was taken
virtual double Part.RequestResource ( string  resourceName,
double  demand 
)
inlinevirtual

Request a Resource. Obeys resource flow mode.

Parameters
resourceNameResource name being requested
demandThe amount being requested
Returns
The amount that was taken
virtual double Part.RequestResource ( string  resourceName,
double  demand,
bool  simulate 
)
inlinevirtual

Request a Resource. Obeys resource flow mode.

Parameters
resourceNameResource name being requested
demandThe amount being requested
simulateIf true will use the SimulationResources
Returns
The amount that was taken
virtual double Part.RequestResource ( int  resourceID,
double  demand,
ResourceFlowMode  flowMode 
)
inlinevirtual

Request a Resource. Obeys resource flow mode.

Parameters
resourceIDResource ID being requested
demandThe amount being requested
flowModeResourceFlowMode to use (overrides default resource flowmode)
Returns
The amount that was taken
virtual double Part.RequestResource ( int  resourceID,
double  demand,
ResourceFlowMode  flowMode,
bool  simulate 
)
inlinevirtual

Request a Resource. Obeys resource flow mode.

Parameters
resourceIDResource ID being requested
demandThe amount being requested
flowModeResourceFlowMode to use (overrides default resource flowmode)
simulateIf true will use the SimulationResources
Returns
The amount that was taken
virtual double Part.RequestResource ( string  resourceName,
double  demand,
ResourceFlowMode  flowMode 
)
inlinevirtual

Request a Resource.

Parameters
resourceNameResource name being requested
demandThe amount being requested
flowModeResourceFlowMode to use (overrides default resource flowmode)
Returns
The amount that was taken
virtual double Part.RequestResource ( string  resourceName,
double  demand,
ResourceFlowMode  flowMode,
bool  simulate 
)
inlinevirtual

Request a Resource.

Parameters
resourceNameResource name being requested
demandThe amount being requested
flowModeResourceFlowMode to use (overrides default resource flowmode)
simulateIf true will use the SimulationResources
Returns
The amount that was taken
void Part.ResetCamera ( )
inline
void Part.ResetCollisionIgnores ( )
inline
void Part.ResetCollisions ( )
inline

Will reset all known collisions for this Part and reset the Vessel's landed/splash status. Use at your own risk!

Parameters
collider
void Part.ResetCollisionsCheck ( )
inline
void Part.ResetJoints ( )
inline
void Part.ResetModelMeshRenderersCache ( )
inline

Reset the cached result of MeshRenderer components on this part

void Part.ResetModelRenderersCache ( )
inline

Reset the cached result of Renderer components on this part

void Part.ResetModelSkinnedMeshRenderersCache ( )
inline

Reset the cached result of SkinnedMeshRenderer components on this part

void Part.ResetMPB ( )
inline

Resets the part MaterialPropertyBlock to handle its shader properties

void Part.ResetPri ( )
inline
void Part.ResetSimulation ( )
inline

Will Reset the SimulationResources list.

void Part.ResetSimulationResources ( )
inline

Resets the SimulationResources list amounts (from the Resources list).

void Part.ResetSimulationResources ( PartResourceList  sourceList)
inline

Resets the SimulationResources list amounts (from a passed in Resources list).

void Part.ResumeVelocity ( )
inline

Applies the orbital velocity to the rigidbodies on the ship, so that it continues to orbit by physics

void Part.SaveEffects ( ConfigNode  node)
inline
void Part.ScheduleSetCollisionIgnores ( )
inline
void Part.SendEvent ( string  eventName)
inline
void Part.SendEvent ( string  eventName,
BaseEventDetails  data 
)
inline
void Part.SendEvent ( string  eventName,
BaseEventDetails  data,
int  maxDepth 
)
inline
void Part.SetCollisionIgnores ( )
inline
void Part.SetDetectCollisions ( bool  setState)
inline
void Part.SetHierarchyRoot ( Part  root)
inline

Sets this part as the root of the vessel hierarchy. Will flip parent-child references recursively so that this part becomes the parent for everyone.

< store the ref to the current parent.

void Part.SetHighlight ( bool  active,
bool  recursive 
)
inline

Set the highlight state manually

Parameters
activeIf highlight should be on or off
void Part.SetHighlightColor ( Color  color)
inline

Sets the highlight colour. Use no color to reset to default

Parameters
color
void Part.SetHighlightColor ( )
inline

Sets the highlight colour to default. Use colour parameter to set the colour.

void Part.SetHighlightDefault ( )
inline

Sets the PartHighlight to default settings

void Part.SetHighlightType ( HighlightType  type)
inline

Sets the highlight type for this part - default is PartHighlight.HighlightType.OnMouseOver

Parameters
typePartHighlight.HighlightType
void Part.SetLayer ( GameObject  obj,
int  layer 
)
inlineprotected
void Part.SetMirror ( Vector3  mirrorVector)
inline
void Part.SetOpacity ( float  opacity)
inline

set the opacity of the part

Parameters
highlightColorThe highlight color. Use Color.black to unhighlight
void Part.setParent ( Part  p = null)
inline

called by the editor when the part is attached or detached from the ship.

Parameters
pThe parent part if the part is being attached. Null if it's being detached
void Part.SetReferenceTransform ( Transform  t)
inline
void Part.SetResource ( ConfigNode  node)
inline

Finds and Reloads (or creates if not found) a Resource in the ResourceList and SimulationResourceList from a ConfigNode.

Parameters
node
void Part.SetSameVesselInteraction ( KSPActionParam  act)
inline

Enable the SameVesselCollision bool.

virtual void Part.SetSymmetryValues ( Vector3  newPosition,
Quaternion  newRotation 
)
inlinevirtual

Reimplemented in CompoundPart.

void Part.SetupAttachNodes ( )
inline
void Part.SetupHighlighter ( )
inline
void Part.SetupResources ( )
inline

Cretes the Resources and Simulation resources PartResourceLists if they don't exist or are not valid.

void Part.SetupRigidAttachmentUI ( )
inline
void Part.SetupSimulationResources ( )
inline
void Part.SetVesselNaming ( )
inline
virtual void Part.ShowUpgradeStats ( )
inlinevirtual
void Part.SpawnIVA ( )
inline
void Part.SpawnTransferDialog ( )
inline
void Part.ToggleAutoStrut ( )
inline

< Do not include the "force" enumerations here, we don't want the user to be able to affect those.

void Part.ToggleRigidAttachment ( )
inline
void Part.ToggleSameVesselInteraction ( KSPActionParam  act)
inline

Toggles the SameVesselCollision bool.

virtual double Part.TransferResource ( int  resourceID,
double  amount 
)
inlinevirtual

Transfer some amount of Resources in or out of this part.

Parameters
resourceIDThe id of the resource to transfer
amountThe amount to transfer (positive for putting, negative for draining)
Returns
The amount transferred (positive if drained, negative if put)
virtual double Part.TransferResource ( PartResource  resource,
double  amount,
Part  other 
)
inlinevirtual

Transfer some amount of Resources in or out of this part.

Parameters
resourceThe resource to transfer
amountThe amount to transfer (positive for putting, negative for draining)
otherThe other part (the one pushing or pulling)
Returns
The amount transferred (positive if drained, negative if put)
virtual double Part.TransferResource ( PartResource  resource,
double  amount,
Part  other,
bool  simulate 
)
inlinevirtual

Transfer some amount of Resources in or out of this part.

Parameters
resourceThe resource to transfer
amountThe amount to transfer (positive for putting, negative for draining)
otherThe other part (the one pushing or pulling)
simulateIf true will bypass thermal processing and GameEvent firing.
Returns
The amount transferred (positive if drained, negative if put)

< return the amount requested - this preserves its precision rather than losing it when the current resource amounts are large

< return the amount requested - this preserves its precision rather than losing it when the current resource amounts are large

void Part.Undock ( DockedVesselInfo  newVesselInfo)
inline

< check if the stored root part is still good to be the root part

< Generate fresh UUID.

< if this part was the one in ground contact, tell the vessel to check if it's still landed (through other parts maybe)

< fallback the reference transform on the old vessel if the one it had got undocked just now.

void Part.unfreeze ( )
inline
void Part.Unpack ( )
inline
void Part.UnregisterCrew ( )
inline
void Part.Update ( )
inline
void Part.UpdateAeroDisplay ( )
inline
void Part.UpdateAttachNodes ( )
inline
void Part.UpdateAutoStrut ( )
inline
void Part.UpdateMass ( )
inline
void Part.UpdateOrgPosAndRot ( Part  newRoot)
inline
void Part.UpdateSrfAttachNode ( )
inline
void Part.UpdateStageability ( bool  propagate,
bool  iconUpdate 
)
inline

< does this match our prior state? Note: Default state for everything is stagingOn so

< notify the module (i.e. so it can change event guinames)

< run with propagate false, but preserving icon state

void Part.ValidateInertiaTensor ( )
inline
static Vector3 Part.VesselToPartSpaceDir ( Vector3  dir,
Part  p,
Vessel  v,
PartSpaceMode  space 
)
inlinestatic

Transform a direction from vessel-relative space to a part's local space

static Vector3 Part.VesselToPartSpacePos ( Vector3  pos,
Part  p,
Vessel  v,
PartSpaceMode  space 
)
inlinestatic

Transform a point from vessel-relative space to a part's local space

static Quaternion Part.VesselToPartSpaceRot ( Quaternion  rot,
Part  p,
Vessel  v,
PartSpaceMode  space 
)
inlinestatic

Transform a rotation from vessel-relative space to a part's local space

delegate void Part.voidPartDelegate ( Part  p)

Member Data Documentation

double Part.absorptiveConstant = -1d
bool Part.ActivatesEvenIfDisconnected = true
bool Part.aeroDisplayWasActive = false
double Part.aerodynamicArea = 0d
Transform Part.airlock

noAutoEVAAny disables auto EVA always, whereas noAutoEVAMulti allows it if there is only one part on the vessel.

List<IAirstreamShield> Part.airstreamShields = new List<IAirstreamShield>()
List<Part> Part.allParts = new List<Part>()
static
bool Part.AlwaysRecheckShielding = true
static

Do we force a recheck of shielding a frame after Start() finsihes? This is so if a shield was somehow destroyed prior to start and our state is still shielded, we don't always stay shielded. This one is static, and if false, no parts will do this.

bool Part.alwaysShowResourcePriority = false
double Part.analyticInternalInsulationFactor = 1d
double Part.analyticSkinInsulationFactor = 1d
float Part.angularDrag = 2f
bool Part.angularDragByFI = true
bool Part.applyKerbalMassModification = true

Whether the part should apply mass modifications due to crew mass.

AsteroidCollider Part.asteroidCollider
double Part.atmDensity

1.0+ thermo

bool Part.attached = false
protected

Flag for whether the part is directly attached to another (it's not the same as parent != null because this is also true for root parts)

PartJoint Part.attachJoint
AttachNodeMethod Part.attachMethod
AttachModes Part.attachMode
List<AttachNode> Part.attachNodes = new List<AttachNode>()
AttachRules Part.attachRules
Vector3 Part.attPos = Vector3.zero
Vector3 Part.attPos0 = Vector3.zero
Quaternion Part.attRotation = Quaternion.identity
Quaternion Part.attRotation0 = Quaternion.identity
bool Part.autoStrutEnableOptionEditor = true
bool Part.autoStrutEnableOptionFlight = true
bool Part.autoStrutExcludeParent = true
AutoStrutMode Part.autoStrutMode = AutoStrutMode.Off
PartVariant Part.baseVariant

The Base Variant for this Part.

float Part.blackBodyRadiationAlphaMult = 1f
ArrowPointer Part.bodyLiftArrowPtr
Vector3 Part.bodyLiftLocalPosition = Vector3.zero
Vector3 Part.bodyLiftLocalVector = Vector3.zero
float Part.bodyLiftMultiplier = 1f
string Part.bodyLiftOnlyAttachName
ILiftProvider Part.bodyLiftOnlyProvider = null
bool Part.bodyLiftOnlyUnattachedLift = false
bool Part.bodyLiftOnlyUnattachedLiftActual = false
float Part.bodyLiftScalar = 0f
Vector3 Part.boundsCentroidOffset = Vector3.zero
float Part.boundsMultiplier = 1f
float Part.breakingForce = 22f
float Part.breakingTorque = 22f
float Part.buoyancy = 1.0f
string Part.buoyancyUseCubeNamed = ""
bool Part.buoyancyUseSine = true
bool Part.canAimCamera = true
Vector3 Part.CenterOfBuoyancy = Vector3.zero
Vector3 Part.CenterOfDisplacement = Vector3.zero
voidPartDelegate Part.CheckPartG = _CheckPartG
static
voidPartDelegate Part.CheckPartPressure = _CheckPartPressure
static
voidPartDelegate Part.CheckPartTemp = _CheckPartTemp
static
List<Part> Part.children = new List<Part>()
int Part.childStageOffset = 0
new Collider Part.collider
CollisionEnhancer Part.collisionEnhancer
int Part.collisionEnhancerSkipFrames = 5

The number of FixedUpdate frames to skip when the part is made physical (from physicsless) in the CollisionEnhancer component.

Vector3 Part.CoLOffset = Vector3.zero
Vector3 Part.CoMOffset = Vector3.zero
bool Part.compund
protected

Flag for whether the part is able to attach to another

bool Part.connected = false
protected
List<IConstruction> Part.constructionModules

A cached list of PartModules that implement IConstruction interface. Set list to null to reset the cache.

Vector3 Part.CoPOffset = Vector3.zero
uint Part.craftID

a unique id used in the editor. Defaults to object instance id or loaded from craft data. Will not be reliable after docking

float Part.crashTolerance = 9f
int Part.CrewCapacity = 0
double Part.crewRespawnTime = 0d
bool Part.crewTransferAvailable = true
PartSet Part.crossfeedPartSet

This is the cross feed PartSet for this part. It is created by the Vessel and ShipConstruct classes.

DictionaryValueList<Collider, int> Part.currentCollisions = new DictionaryValueList<Collider, int>()
string Part.customPartData = ""

A string for saving and loading custom part data. (Do not use linebreaks here. If storing multiple values, separate them with a semicolon

Coroutine Part.cyclingAutoStruts
float Part.defaultHighlightFalloff = 2f
static
Color Part.defaultHighlightNone = new Color32(0, 0, 0, 0)
static
Color Part.defaultHighlightPart = Highlighter.colorPartHighlightDefault
static
int Part.defaultInverseStage = 0
List<PartModule> Part.dockingPorts = new List<PartModule>()

original position and rotation, in relation to the vessel. This is set by the vessel when it's first initialized

ArrowPointer Part.dragArrowPtr
DragModel Part.dragModel = DragModel.CUBE
Vector3 Part.dragReferenceVector = Vector3.up
float Part.dragScalar = 0f
Vector3 Part.dragVector = Vector3.up
Vector3 Part.dragVectorDir = Vector3.up
Vector3 Part.dragVectorDirLocal = Vector3.up
float Part.dragVectorMag = 0f
float Part.dragVectorSqrMag = 0f
double Part.dynamicPressurekPa
float Part.edgeHighlightThresholdMult = 1f
Part Part.editorCollision
bool Part.editorFirstTimePlaced = false

First time the part is placed in the vessel in VAB

List<Part> Part.editorLinks = new List<Part>()
bool Part.editorStarted = false
double Part.emissiveConstant = 0.4d
bool Part.explodeOverheat
protected

If this part exploded due to an overheat.

float Part.explosionPotential = 0.5f
double Part.exposedArea = 0d
string Part.FailureState = "Failed"
string Part.flagURL = ""
uint Part.flightID

a unique id to identify this part in flight. This one is guaranteed to be unique for all parts in the simulation. Not assigned in the editor.

Vector3d Part.force = Vector3d.zero
List<ForceHolder> Part.forces = new List<ForceHolder>(2)
bool Part.frozen
bool Part.fuelCrossFeed = true
bool Part.fuelFlowOverlayEnabled = false
List<Part> Part.fuelLookupTargets = new List<Part>()
uint Part.fuelRequestID = 0
static
List<FXGroup> Part.fxGroups = new List<FXGroup>()
float Part.gaugeThresholdMult = 1f
float Part.gExplodeChance = 0.8f

Chance per second, i.e. multiplied by fixedDeltaTime

bool Part.GroundContact
double Part.gTolerance = 50d
float Part.habitableVolume = 0
bool Part.hasHeiarchyModel
bool Part.hasKerbalOnLadder = false

This will be true if there is a EVA kerbal standing on a ladder on this part.

bool Part.hasLiftModule = false
float Part.hatchObstructionCheckInwardDistance = 1.1f
float Part.hatchObstructionCheckInwardOffset = 1f
float Part.hatchObstructionCheckOutwardDistance = 1f
float Part.hatchObstructionCheckSphereOffset = 0.1f
float Part.hatchObstructionCheckSphereRadius = 0.22f
double Part.heatConductivity = 0.12d
double Part.heatConvectiveConstant = 1.0d
Color Part.highlightColor = defaultHighlightPart
HighlightType Part.highlightType = HighlightType.OnMouseOver
string Part.initialVesselName
Quaternion Part.initRotation = Quaternion.identity
int Part.inStageIndex = -1
InternalModel Part.internalModel
string Part.InternalModelName = ""
int Part.inverseStage = 0
bool Part.inverseStageCarryover = true

True when this inverseStage index should carry over to non-stageable parts.

bool Part.isClone = false
Vessel.ControlLevel Part.isControlSource

Flag for whether this part can provide input to the vessel. (tweaked by command modules)

physical significance of the part.

bool Part.isMirrored = false

set to true if mirrorVector != Vector3.one

bool Part.isPersistent
string Part.isShieldedDisplay = ""
uint Part.lastFuelRequestId = 0
uint Part.launchID

another unique number shared by all parts launched together on the same vessel

LayerMask Part.layerMask = LayerUtil.DefaultEquivalent | (1 << 26) | (1 << 1)
static
double Part.machNumber = 0f
int Part.manualStageOffset = -1
float Part.mass = 2.0f
float Part.maximum_drag = 0.1f
double Part.maxPressure = 4000d
double Part.maxTemp = 2000d
double Part.minDepth
float Part.minimum_drag = 0.1f
Vector3 Part.mirrorAxis = Vector3.zero
Vector3 Part.mirrorRefAxis
Vector3 Part.mirrorVector = Vector3.one
uint Part.missionID

a unique number shared by all parts launched together on the same vessel

Vector3 Part.moduleSize = Vector3.zero
bool Part.needPrefabMass = true
bool Part.noAutoEVAAny = false
bool Part.noAutoEVAMulti = false
string Part.NoCrossFeedNodeKey = ""
Callback Part.OnEditorAttach = () => { }
Callback Part.OnEditorDestroy = () => { }
Callback Part.OnEditorDetach = () => { }
Callback Part.OnJustAboutToBeDestroyed = () => { }
Callback Part.OnJustAboutToDie = () => { }
Vector3 Part.orgPos
Quaternion Part.orgRot
Part Part.originalPart
int Part.originalStage = 0
bool Part.overrideSkillUpdate = false
string Part.overrideSkillUpdateModules = "ModuleSAS, ModuleWheelSteering"
bool Part.packed
Part Part.parent
PartBuoyancy Part.partBuoyancy
AvailablePart Part.partInfo
string Part.partName
List<string> Part.partRendererBoundsIgnore
float Part.partSeatMassReduction = 0f

The amount of mass that was removed in the db load based on the number of seats and if the part has a command module

This is calculated using the PerSeatReduction vars in PhysicsGlobals and is based on kerbals having actual IVA mass from 1.11 onwards

Transform Part.partTransform
bool Part.PermanentGroundContact

flags if part is always touching the surface, i.e. a launch clamp.

uint Part.persistentId

a unique id used for the life of the part.

PhysicalSignificance Part.physicalSignificance = PhysicalSignificance.FULL
double Part.physicsMass = 0d
int Part.PhysicsSignificance = -1
Vector3 Part.posBackup
protected
Part Part.potentialParent
float Part.prefabMass = 0f
Vector3 Part.prefabSize = Vector3.zero
PartStates Part.PreFailState = PartStates.IDLE
float Part.presExplodeChance = 0.8f

Chance per second, i.e. multiplied by fixedDeltaTime

PhysicalSignificance Part.previousPhysicalSignificance

References the physical significance before swapping it due the rotate or move tools on construction mode

List<ProtoCrewMember> Part.protoModuleCrew = new List<ProtoCrewMember>()
ProtoPartSnapshot Part.protoPartSnapshot
PartThermalData Part.ptd
double Part.radiativeArea = 0d
double Part.radiatorCritical = 0.75d
double Part.radiatorHeadroom = 0.25d
double Part.radiatorMax = 0.25d
Rigidbody Part.rb
bool Part.recheckShielding = true

This is the local variant of AlwaysRecheckShielding. If this is false, even if AlwaysRecheckShielding is true, we won't recheck shielding.

Dictionary<Type, ReflectedAttributes> Part.reflectedAttributeCache = new Dictionary<Type, ReflectedAttributes>()
staticprotected
float Part.rescaleFactor = 1.25f

This is the scale factor that's applied after loading. It rescales the model and any nodes. Use to convert from model space to world space.

float Part.resourceMass = 0f
int Part.resourcePriorityOffset = 0
bool Part.resourcePriorityUseParentInverseStage = false

If true, instead of our inverseStage, use parent's (if not null) inverseStage when reporting res priority

double Part.resourceRequestRemainingThreshold = 1e-12d
List<Part> Part.resourceTargets = new List<Part>()
protected
double Part.resourceThermalMass = 0d
PartStates Part.ResumeState = PartStates.IDLE
bool Part.rigidAttachment = false
bool Part.sameVesselCollision = false

If this field is True colliders on this part will interact with colliders on other Parts within the same Vessel that also have this field set to true.

float Part.scaleFactor = 1f

This is the scale factor used in the mesh exporter. Use to convert from 3D scene space to model space.

int Part.separationIndex = 0
Rigidbody Part.servoRb

If the Part contains a BaseServo (Robotic servo) this will be set to the moving part of the servo's RB (The part has two RBs).

ShipConstruct Part.ship
PartSet Part.simulationCrossfeedPartSet

This is the simulation cross feed PartSet for this part used in delta v calculations. It is created by the Vessel and ShipConstruct classes.

double Part.skinExposedArea = 0f
double Part.skinExposedAreaFrac = 0f
double Part.skinExposedMassMult = 1d
double Part.skinInternalConductionMult = 1d
double Part.skinMassPerArea = 1d
double Part.skinMaxTemp = -1d
double Part.skinSkinConductionMult = 1d
double Part.skinTemperature
double Part.skinThermalMass
double Part.skinThermalMassModifier = 1d
double Part.skinThermalMassRecip
double Part.skinToInternalFlux = 0d
double Part.skinUnexposedExternalTemp = 4f
double Part.skinUnexposedMassMult = 0d
double Part.skinUnexposedTemperature = 0d
bool Part.skipColliderIgnores = false
AttachNode Part.srfAttachNode

flag for whether the part is connected to the command pod or not (however indirectly) [Needless to say, this is obsolete logic now)

double Part.stackPriThreshold = 1e-3d

public bool DEBUG = false;

int Part.stackSymmetry = 0
bool Part.stageAfter = false
bool Part.stageBefore = false
int Part.stageOffset = 0
string Part.stagingIcon = ""
bool Part.stagingIconAlwaysShown = false
bool Part.stagingOn = true
bool Part.started
PartStates Part.state = PartStates.IDLE
protected
double Part.staticPressureAtm
Vector3 Part.strutOffset = Vector3.zero
double Part.submergedDragScalar = 1d
double Part.submergedDynamicPressurekPa = 0d
double Part.submergedLiftScalar = 0d
double Part.submergedPortion = 0d
Vector3 Part.surfaceAreas = Vector3.one
GameObject Part.surfaceAttachGO
SymmetryMethod Part.symMethod
List<Part> Part.symmetryCounterparts = new List<Part>()
double Part.temperature = -1d
float Part.tempExplodeChance = 0.8f

Chance per second, i.e. multiplied by fixedDeltaTime

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 = 0d
double Part.thermalMassModifier = 1.0d
double Part.thermalMassReciprocal = 1d
double Part.thermalRadiationFlux
double Part.thermalSkinFlux
double Part.thermalSkinFluxPrevious
AttachNode Part.topNode
Vector3d Part.torque = Vector3d.zero
voidPartDelegate Part.UpgradeStatsDel
static
ModulePartVariants Part.variants

The PartModule Variants for this part (if one is attached).

Vector3 Part.vel
Vessel Part.vessel
VesselNaming Part.vesselNaming
string Part.vesselNamingDisplayName
protected
string Part.vesselNamingDisplayPriority
protected
VesselType Part.vesselType = VesselType.Debris
float Part.waterAngularDragMultiplier = 1f
bool Part.WaterContact

Property Documentation

BaseActionList Part.Actions
get
bool Part.CanFail
getset
int Part.ClassID
get
string Part.ClassName
get
DragCubeList Part.DragCubes
get
EffectList Part.Effects
get
BaseEventList Part.Events
get
BaseFieldList Part.Fields
get
bool Part.hasStagingIcon
get
bool Part.HighlightActive
getset
Highlighter Part.highlighter
getset
List<Renderer> Part.HighlightRenderer
getset
bool Part.isAttachable
get
bool Part.isAttached
getset

Flag for whether the part is directly attached to another (it's not the same as parent != null because this is also true for root parts)

bool Part.isCompund
get
bool Part.isControllable
get

flag for wether this part will receive an input feed (use this if reading FlightInputHandler.state directly)

bool Part.isVesselEVA
get

Returns true if the Vessel this Part is a part of is an EVA Kerbal. - Includes null check if vessel is null returns false.

Returns
bool Part.Landed
get
Part Part.localRoot
get
List<ModuleAnimateGeneric> Part.ModuleAnimateGenerics
get

The ModuleAnimateGeneric modules for this part (if there are any).

PartModuleList Part.Modules
get
bool Part.MouseOver
get
MaterialPropertyBlock Part.mpb
get
bool Part.NoAutoEVA
get
Orbit Part.orbit
get
UIPartActionWindow Part.PartActionWindow
get
ReflectedAttributes Part.PartAttributes
getset
bool Part.PartTweakerSelected
getset

Returns true if the current part selected is the tweaker "target anchor transform" point of a part, like the end point of a compound part.

PartValues Part.PartValues
get
bool Part.RecurseHighlight
getset
PartResourceList Part.Resources
get

This is the PartResourceList for the part.

Rigidbody Part.Rigidbody
get
Part Part.RigidBodyPart
get
bool Part.ShieldedFromAirstream
getset
PartResourceList Part.SimulationResources
get

This is the delta v simulation PartResourceList for the part.

bool Part.Splashed
get
PartStates Part.State
getset
Vector3 Part.WCoM
get

The documentation for this class was generated from the following file: