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

Public Types

enum  AttachState { AttachState.Detached, AttachState.Attaching, AttachState.Attached }
 
- Public Types inherited from Part
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

override Collider[] GetPartColliders ()
 
override Part GetReferenceParent ()
 
override Transform GetReferenceTransform ()
 
override void LateUpdate ()
 
override 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...
 
override void onEditorEndTweak ()
 Called when the part finishes getting tweaked in position/rotation on the editor (Mainly for struts). More...
 
override void onEditorStartTweak ()
 Called when the part starts getting tweaked in position/rotation on the editor (Mainly for struts). More...
 
override 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...
 
override 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...
 
override void OnLoad (ConfigNode node)
 
override void OnPartCreatedFomInventory (ModuleInventoryPart moduleInventoryPart)
 This method is called when a part is being taken out from a slot while being in EVAConstruction mode. More...
 
override void OnSave (ConfigNode node)
 
ConfigNode ParseCustomPartData (string customPartData)
 
bool raycastTarget (Vector3 dir)
 
override void SetSymmetryValues (Vector3 newPosition, Quaternion newRotation)
 
void ToggleTweakTarget (bool tweakTargetValue)
 
void UpdateTargetCoords ()
 
void UpdateWorldValues ()
 
- Public Member Functions inherited from Part
bool activate (int currentStage, Vessel activeVessel)
 
void AddAttachNode (ConfigNode node)
 
void addChild (Part child)
 
bool AddCrewmember (ProtoCrewMember crew)
 
bool AddCrewmemberAt (ProtoCrewMember crew, int seatIndex)
 
void AddExposedThermalFlux (double kilowatts)
 
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 Renderer[] GetPartRenderers ()
 
float GetPhysicslessChildMass ()
 
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)
 
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...
 
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 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...
 
void OnLiftOff ()
 
void OnLoad ()
 
void OnPartJointBreak (float breakForce)
 
void OnPointerClick (PointerEventData eventData)
 
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...
 
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)
 

Public Attributes

AttachState attachState = AttachState.Detached
 
Vector3 direction
 
bool disconnectAction = false
 Allows this compound part to display the disconnect KSPEvent and disconnect KSPAction. More...
 
string disconnectedEffectName = "Disconnect"
 
float maxLength = 10f
 
Part target
 
string targetMeshColName
 
Vector3 targetPosition
 
Quaternion targetRotation
 
- Public Attributes inherited from Part
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
 

Protected Member Functions

void DisconnectAction (KSPActionParam param)
 
void DisconnectCompoundPart ()
 
void DisconnectEvent ()
 
override void onCopy (Part original, bool asSymCPart)
 Called when the part is instantiated as a copy, through Alt+Copy or symmetry More...
 
override void onEditorUpdate ()
 called on physics update while the game is at the VAB. More...
 
override 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...
 
override 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...
 
override void onPartDestroy ()
 
override 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...
 
override 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...
 
override void onStartComplete ()
 called at the end of the start method in all scenes. In flight, this is after rigidbody initialization. More...
 
- Protected Member Functions inherited from Part
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 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 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 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 onPartExplode ()
 called when the part explodes. 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 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)
 

Properties

bool isTweakingTarget [get, set]
 
- Properties inherited from Part
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]
 

Additional Inherited Members

- Static Public Member Functions inherited from Part
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...
 
- Static Public Attributes inherited from Part
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
 
- Static Protected Member Functions inherited from Part
static ReflectedAttributes GetReflectedAttributes (Type partModuleType)
 
- Protected Attributes inherited from Part
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 inherited from Part
static Dictionary< Type,
ReflectedAttributes
reflectedAttributeCache = new Dictionary<Type, ReflectedAttributes>()
 

Member Enumeration Documentation

Enumerator
Detached 
Attaching 
Attached 

Member Function Documentation

void CompoundPart.DisconnectAction ( KSPActionParam  param)
inlineprotected
void CompoundPart.DisconnectCompoundPart ( )
inlineprotected
void CompoundPart.DisconnectEvent ( )
inlineprotected
override Collider [] CompoundPart.GetPartColliders ( )
inlinevirtual

Reimplemented from Part.

override Part CompoundPart.GetReferenceParent ( )
inlinevirtual

Reimplemented from Part.

override Transform CompoundPart.GetReferenceTransform ( )
inlinevirtual

Reimplemented from Part.

override void CompoundPart.LateUpdate ( )
inlinevirtual

Reimplemented from Part.

override void CompoundPart.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 from Part.

override void CompoundPart.onCopy ( Part  original,
bool  asSymCounterpart 
)
inlineprotectedvirtual

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

Reimplemented from Part.

override void CompoundPart.onEditorEndTweak ( )
inlinevirtual

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

Reimplemented from Part.

override void CompoundPart.onEditorStartTweak ( )
inlinevirtual

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

Reimplemented from Part.

override void CompoundPart.onEditorUpdate ( )
inlineprotectedvirtual

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

Reimplemented from Part.

override void CompoundPart.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 from Part.

override void CompoundPart.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 from Part.

override void CompoundPart.OnLoad ( ConfigNode  node)
inlinevirtual

Reimplemented from Part.

override void CompoundPart.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 from Part.

override void CompoundPart.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 from Part.

override void CompoundPart.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 from Part.

override void CompoundPart.onPartDestroy ( )
inlineprotectedvirtual

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

Reimplemented from Part.

override void CompoundPart.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 from Part.

override void CompoundPart.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 from Part.

override void CompoundPart.OnSave ( ConfigNode  node)
inlinevirtual

Reimplemented from Part.

override void CompoundPart.onStartComplete ( )
inlineprotectedvirtual

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

Reimplemented from Part.

ConfigNode CompoundPart.ParseCustomPartData ( string  customPartData)
inline
bool CompoundPart.raycastTarget ( Vector3  dir)
inline
override void CompoundPart.SetSymmetryValues ( Vector3  newPosition,
Quaternion  newRotation 
)
inlinevirtual

Reimplemented from Part.

void CompoundPart.ToggleTweakTarget ( bool  tweakTargetValue)
inline
void CompoundPart.UpdateTargetCoords ( )
inline
void CompoundPart.UpdateWorldValues ( )
inline

Member Data Documentation

AttachState CompoundPart.attachState = AttachState.Detached
Vector3 CompoundPart.direction
bool CompoundPart.disconnectAction = false

Allows this compound part to display the disconnect KSPEvent and disconnect KSPAction.

string CompoundPart.disconnectedEffectName = "Disconnect"
float CompoundPart.maxLength = 10f
Part CompoundPart.target
string CompoundPart.targetMeshColName
Vector3 CompoundPart.targetPosition
Quaternion CompoundPart.targetRotation

Property Documentation

bool CompoundPart.isTweakingTarget
getset

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