Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
ModuleDockingNode Class Reference
Inheritance diagram for ModuleDockingNode:
PartModule ITargetable IStageSeparator IContractObjectiveModule IResourceConsumer IJointLockState

Public Member Functions

bool CheckContractObjectiveValidity ()
 Whether this particular module is valid for this objective. For example, leg wheels versus rover wheels. More...
 
bool CheckDockContact (ModuleDockingNode m1, ModuleDockingNode m2, float minDist, float minFwdDot, float minRollDot)
 Check if two docking nodes are positioned and oriented such that they are able to connect. More...
 
bool CrossfeedToggleableEditor ()
 
bool CrossfeedToggleableFlight ()
 
void Decouple ()
 
void DecoupleAction (KSPActionParam param)
 
override void DemoteToPhysicslessPart ()
 This method will be called from Part class DemoteToPhysicslessPart when the part is being converted from physical to physicsless part. It is called before the joints and rigidbodies are destroyed. More...
 
void DestroySameVesselJoint ()
 
void DisableXFeed ()
 
void DisableXFeedAction (KSPActionParam param)
 
void DisengageNodeLock ()
 Disengage the Rotation Lock on this part More...
 
void DockToSameVessel (ModuleDockingNode node)
 
void DockToVessel (ModuleDockingNode node)
 
void EnableXFeed ()
 
void EnableXFeedAction (KSPActionParam param)
 
bool EngageNodeLock ()
 Engage the Rotation Lock on this part More...
 
ModuleDockingNode FindNodeApproaches ()
 
ModuleDockingNode FindOtherNode ()
 
void FixedUpdate ()
 
bool GetActiveTargetable ()
 
List< PartResourceDefinitionGetConsumedResources ()
 
string GetContractObjectiveType ()
 Gets the string identifier for this contract type. Stock contracts use ContractDefs constants, but could be used for non-stock contracts. More...
 
string GetDisplayName ()
 
ModuleDockingNode GetDominantNode (ModuleDockingNode m1, ModuleDockingNode m2)
 Find the dominant node in a same-vessel dock situation. The secondary node will create the joint. More...
 
Vector3 GetFwdVector ()
 
override string GetInfo ()
 Returns formatted string of additional data for use in the VAB and SPH More...
 
override string GetModuleDisplayName ()
 Override this to provide a Localized version of the PartModules Name for UI components More...
 
string GetName ()
 
Vector3 GetObtVelocity ()
 
Orbit GetOrbit ()
 
OrbitDriver GetOrbitDriver ()
 
Vector3 GetSrfVelocity ()
 
int GetStageIndex (int fallback)
 
override string GetStagingDisableText ()
 
override string GetStagingEnableText ()
 
VesselTargetModes GetTargetingMode ()
 
Transform GetTransform ()
 
Vessel GetVessel ()
 
bool IsJointUnlocked ()
 Return the part joint state More...
 
override bool IsStageable ()
 Should this module be counted when seeing whether to have a stack icon present? Override in a module for custom behavior; otherwise returns true if the module (or something the module inherits from above PartModule itself) overrides OnActive() More...
 
IEnumerator lateFSMStart (PartModule.StartState st)
 
void LateUpdate ()
 
void MakePrimary ()
 
void MakeReferenceToggle (KSPActionParam act)
 
void MakeReferenceTransform ()
 
bool NodeIsTooFar ()
 
override void OnActive ()
 Called when the part is set active (after unpacking etc) More...
 
override void OnAwake ()
 Method fires once the module has been added to the part. Use for first time setup. Module will not have loaded fully by this point More...
 
void OnConstructionAttach ()
 
override void OnInitialize ()
 Called on all modules after all parts are loaded but before they give the ship to the game More...
 
override void OnInventoryModeDisable ()
 This method will be called when this modules part and itself is first disabled (when it is not attached to a vessel) when created in Inventory/Construction mode. More...
 
override void OnInventoryModeEnable ()
 This method will be called when this modules part and itself is first enabled (when it is attached to a vessel) when created in Inventory/Construction mode. More...
 
override void OnLoad (ConfigNode node)
 Use OnLoad to load any additional data from the ConfigNode provided More...
 
override void OnModuleAdjusterRemoved (AdjusterPartModuleBase adjuster)
 Perform processing specific to this part module when an adjuster is removed. More...
 
void OnOtherNodeSameVesselDisconnect ()
 
void OnOtherNodeUndock ()
 
override void OnSave (ConfigNode node)
 Use OnSave to serialize additional module information into the ConfigNode provided More...
 
override void OnStart (PartModule.StartState st)
 
override void OnStartFinished (StartState state)
 Called when the part finishes starting. The StartState gives an indication of where in flight you are. All values may not be plugged in! More...
 
override void PromoteToPhysicalPart ()
 This method will be called from Part class PromoteToPhysicalPart when the part is being converted from physicsless to physical part. More...
 
void SetAsTarget ()
 
void SetupFSM ()
 
override bool StagingEnabled ()
 Gets current staging status (is staging enabled for this module) Override me! More...
 
override bool StagingToggleEnabledEditor ()
 
override bool StagingToggleEnabledFlight ()
 
void ToggleXFeedAction (KSPActionParam param)
 
void Undock ()
 
void UndockAction (KSPActionParam param)
 
void UndockSameVessel ()
 
void UnsetTarget ()
 
void Update ()
 
IEnumerator WaitAndSwitchFocus ()
 
- Public Member Functions inherited from PartModule
void AddPartModuleAdjuster (AdjusterPartModuleBase newAdjuster)
 Call this to add an adjuster to this part module. More...
 
void AddPartModuleAdjusterList (List< AdjusterPartModuleBase > moduleAdjusters)
 Applies the appropriate module adjusters. Performs checks to make sure that the adjusters are valid too. More...
 
bool AppliedUpgrades ()
 Returns true if upgrades are applied More...
 
void ApplyAdjustersOnStart ()
 Called when a part module is loaded and applies all of the currently loaded adjusters. More...
 
virtual void ApplyUpgradeNode (List< string > appliedUps, ConfigNode node, bool doLoad)
 Applies the upgrades to a confignode. Will either copy the upgrades back to the node or (if doLoad) calls load/onload on it. More...
 
virtual bool ApplyUpgrades (StartState state)
 Will find and apply upgrades. Called during Part's ModulesOnStart, before a module's OnStart. More...
 
void Awake ()
 
delegate bool boolPMApplyUpgrades (PartModule pm, StartState state)
 
delegate bool boolPMBoolDelegate (PartModule pm, bool apply)
 
void ClearPersistentId ()
 Clear the modules persistentId More...
 
void Copy (PartModule fromModule)
 
virtual bool FindUpgrades (bool fillApplied, ConfigNode node=null)
 Find applicable upgrades to the partmodule (isunlocked and isenabled) and add to the upgradesApplied list. Pass true if you want to add the upgrades to upgradesApplied, false if you just want to know if at least one upgrade is applicable (unlocked rather than enabled) More...
 
virtual Color GetCurrentColor ()
 Returns the current part module color. More...
 
virtual Color GetCurrentColor (string fieldName)
 Returns the current part module color for a field where usespe. More...
 
uint GetPersistenActiontId ()
 Get the modules persistentID, and create one if it doesnt already have one More...
 
uint GetPersistentId ()
 Get the modules persistentID, and create one if it doesnt already have one More...
 
virtual string GetUpgradeInfo ()
 Called by Upgrade Stats dialog More...
 
bool HasUpgrades ()
 Returns true if upgrades exist for the partmodule More...
 
bool IsValidContractObjective (string objectiveType)
 Returns if, for example, an antenna part module qualifies as an antenna for contracts. More...
 
void Load (ConfigNode node)
 
virtual void LoadUpgrades (ConfigNode node)
 Loads module-relevant upgrades from the partmodule confignode More...
 
uint NewPersistentId ()
 Reset the modules persistentId to a new number More...
 
virtual void OnColorChanged (Color color)
 Meant to be overwritten by part modules implementing color changes. In this case, it doesn't matter which color picker changed specifically. More...
 
virtual void OnColorChanged (Color color, string pickerID="")
 Meant to be overwritten by part modules implementing color changes More...
 
virtual void OnConstructionModeFixedUpdate ()
 This method will be called when in EVA Construction mode and this part and itself is disabled (when it is not attached to a vessel) every FixedUpdate(). More...
 
virtual void OnConstructionModeUpdate ()
 This method will be called when in EVA Construction mode and this part and itself is disabled (when it is not attached to a vessel) every Update(). More...
 
virtual void OnCopy (PartModule fromModule)
 Use OnCopy to copy any additional data from the PartModule provided More...
 
virtual void OnFixedUpdate ()
 Called every physics/fixed frame that the part is active More...
 
virtual void OnIconCreate ()
 Method fires just before components are stripped from the gameobject to make it an icon. (The part is instantiated and then various components like Part, PartModule, EffectBehaviour, Colliders, Particles, etc are stripped and then it's set as the icon prefab. This lets PartModules do stuff to the model right before that happens. More...
 
virtual void OnInactive ()
 Called before the part goes inactive (after packing etc) More...
 
void OnModuleAdjusterAddedWrapper (AdjusterPartModuleBase adjuster)
 Wrapper to check the mission expansion availability before performing processing specific to this part module when an adjuster is added. More...
 
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...
 
virtual void OnStart (StartState state)
 Called when the part starts. The StartState gives an indication of where in flight you are. All values may not be plugged in! More...
 
virtual void OnStartBeforePartAttachJoint (StartState state)
 Called in flight scene in Part.Start just before the Part attachnode joints are created. More...
 
virtual void OnStoredInInventory (ModuleInventoryPart moduleInventoryPart)
 Called when the part is stored in an inventory. More...
 
virtual void OnUpdate ()
 Called every frame that the part is active More...
 
virtual void OnWasCopied (PartModule copyPartModule, bool asSymCounterpart)
 Called when the PartModule was copied, through Alt+Copy or symmetry More...
 
virtual void OnWillBeCopied (bool asSymCounterpart)
 Called when the PartModule is about to be copied, through Alt+Copy or symmetry More...
 
virtual 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.

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.
More...
 
virtual List< Color > PresetColors ()
 Preset colors received for any part module. By default, returns only black, override to make your own selection. More...
 
virtual string PrintUpgrades ()
 
void RemovePartModuleAdjuster (AdjusterPartModuleBase oldAdjuster)
 Call this to remove an adjuster from this part module. More...
 
void RemovePartModuleAdjusterList (List< AdjusterPartModuleBase > moduleAdjusters)
 Removes the appropriate module adjusters. Performs checks to make sure that the adjusters are valid too. More...
 
void Save (ConfigNode node)
 
virtual void SetStaging (bool newValue)
 Run by the part's staging toggle handler, sets staging on modules on symmetry counterparts. More...
 
void SetStagingState (bool newState)
 Set the staging enabled bool for this module. More...
 
void ToggleStaging ()
 
virtual void UpdateStagingToggle ()
 Updates the staging toggle More...
 
delegate void voidPMApplyNodeDelegate (PartModule pm, List< string > appliedUps, ConfigNode node, bool doLoad)
 
delegate void voidPMDelegate (PartModule pm)
 
delegate void voidPMNodeDelegate (PartModule pm, ConfigNode node)
 

Public Attributes

float acquireForce = 2f
 
float acquireForceTweak = 100f
 
float acquireMinFwdDot = 0.7f
 
float acquireMinRollDot = float.MinValue
 
float acquireRange = 0.5f
 
float acquireTorque = 2f
 
float acquireTorqueRoll = 0f
 
bool animCaptureOff = false
 
bool animDisabledEnter = true
 
bool animDisabledExit = true
 
bool animDisableIfNot1 = true
 
bool animDisengageEnter = true
 
bool animDisengageExit = true
 
bool animEnableIf1 = true
 
bool animReadyEnter = true
 
bool animReadyExit = true
 
bool animUndockOn = false
 
float baseResourceConsumptionRate = 0.02f
 Base resource consumption on motor output when the servo is moving More...
 
bool canRotate = false
 Indicates wether or not player can rotate this docking port, defaults to false to acomodate mods More...
 
float captureMaxRvel = 0.3f
 
float captureMinFwdDot = 0.998f
 
float captureMinRollDot = float.MinValue
 
float captureRange = 0.06f
 
Transform controlTransform
 
string controlTransformName = ""
 
bool crossfeed = true
 
bool DebugFSMState
 If set to true will log FSM state and event changes. More...
 
int deployAnimationController = -1
 
float deployAnimationTarget = 1f
 
ModuleAnimateGeneric deployAnimator
 
uint dockedPartUId
 
int dockingNodeModuleIndex
 
float efficiency = 0.75f
 Servo efficiency (1 = 100%) More...
 
BaseEvent evtSetAsTarget
 
KerbalFSM fsm
 
bool gendered = false
 
bool genderFemale = true
 
Vector2 hardMinMaxLimits = new Vector2(-15, 15)
 The angle range that's defined by the physical limits of the part model and/or the part's designer. A player must not be able to set an angle beyond this range. More...
 
bool inverted
 Setting this true will make the target angle be the invert of the chosen angle More...
 
float maxAnglePerFrame
 
float maxMotorOutput = 100f
 This is the Drive Spring Multiplier. The Joint X Drive position spring is set to: driveSpringMultiplier * torqueLimit More...
 
float minDistanceToReEngage = 1f
 
bool nodeIsLocked = false
 Is the servo motor receiving power and engaged with the joint More...
 
Transform nodeTransform
 
string nodeTransformName = "dockingNode"
 
string nodeType = "size1"
 
HashSet< string > nodeTypes
 
KFSMEvent on_nodeApproach
 
ModuleDockingNode otherNode
 
string referenceAttachNode = ""
 
float referenceConsumptionVelocity = 180f
 The transform velocity (angular or positional) at which the resource consumption is 1 x the baseResourceConsumptionRate More...
 
AttachNode referenceNode
 
string rotationAxis = "Z"
 The rotation axis, defaulted to the z axis. This is necessary as some docks might have a different rotation axis. Can be "X", "X-", "Y", "Y-" or "Z", "Z-". More...
 
string rotationTransformName
 Name of the transform that will rotate More...
 
PartJoint sameVesselDockJoint
 
bool setAnimWrite = true
 
float snapOffset = 90f
 
bool snapRotation = false
 
KFSMState st_ready
 
bool staged = true
 
string state = "Ready"
 
float targetAngle = 0f
 This is the desired current Target Angle set by the user. More...
 
double TatUndock
 
float traverseVelocity = 2.5f
 The traverse speed (in deg/s for rotational motion) More...
 
float undockEjectionForce = 10f
 
bool useReferenceAttachNode = false
 
DockedVesselInfo vesselInfo
 
- Public Attributes inherited from PartModule
bool isEnabled = true
 
bool moduleIsEnabled = true
 
string moduleName
 
bool overrideStagingIconIfBlank = true
 
ModuleResourceHandler resHandler = new ModuleResourceHandler()
 
bool showUpgradesInModuleInfo = false
 
ProtoPartModuleSnapshot snapshot
 
string stagingDisableText = ""
 
bool stagingEnabled = true
 
string stagingEnableText = ""
 
bool stagingToggleEnabledEditor = false
 
bool stagingToggleEnabledFlight = false
 
List< ConfigNodeupgrades
 
List< string > upgradesApplied = new List<string>()
 
bool upgradesApply = true
 
bool upgradesAsk = true
 

Protected Member Functions

virtual void ApplyCoordsUpdate ()
 Applies Part Coordinate Updates. Can be overridden to apply appropriate changes to Part positions/rotations and components (servo transforms within a Part). Will be called when a Part is Unpacked, Vessel is Modified, and just before a ShipConstruct is saved. More...
 
virtual void CalculateResourceDrain ()
 Calculates the current resource drain rate and determines if there's still enough More...
 
Vector3 GetRotationAxis ()
 Returns the axis of rotation More...
 
bool IsAdjusterBlockingUndock ()
 Is there an adjuster attached to this module that will prevent the Undock action More...
 
void ModifyLocked (object obj)
 
virtual void OnDestroy ()
 
override void OnModuleAdjusterAdded (AdjusterPartModuleBase adjuster)
 Perform processing specific to this part module when an adjuster is added. More...
 
void OnPartMenuClose (Part inpPart)
 
void OnPartMenuOpen (UIPartActionWindow window, Part inpPart)
 
virtual void RecurseCoordUpdate (Part p, Part rootPart)
 Sets Part orgPos and orgRot. Is called at the end of ApplyCoordsUpdate(). More...
 
void ServoDisgageLockAction (KSPActionParam param)
 
void ServoEngageLockAction (KSPActionParam param)
 
Quaternion SetTargetRotation (Quaternion startingRotation, float rotationAngle, bool setRotation)
 
Quaternion SetTargetRotation (Quaternion startingRotation, float rotationAngle, bool setRotation, Vector3 rotationAxis)
 
void ToggleLockedAction (KSPActionParam param)
 
void UpdateAlignmentRotation ()
 Updates the alignment rotation of this dock, called on FixedUpdate More...
 
virtual void UpdatePAWUI ()
 
- Protected Member Functions inherited from PartModule
ConfigNode GetUpgrade (string name)
 
virtual void LoadUpgradesApplied (List< string > applieds, ConfigNode node)
 Load the applied upgrade names More...
 
virtual void SaveUpgradesApplied (ConfigNode node)
 Save the applied upgrades. More...
 
IEnumerator UpgradeWaitForScenarioModules ()
 

Protected Attributes

bool hasEnoughResources = true
 
SoftJointLimit lowerRotationLimit
 
float motorRate
 Rate for calculating resource drain More...
 
bool setStagingState = true
 
BaseAxisField targetAngleAxisField
 
UI_FloatRange targetAngleUIField
 
SoftJointLimit upperRotationLimit
 

Properties

bool IsDisabled [get]
 
bool IsRotating [get, set]
 Is this dock currently rotating More...
 
float JointTargetAngle [get]
 This is the target for the joint drive after applying any logic like inversion/offsets and clamping between the limits More...
 
ConfigurableJoint RotationJoint [get]
 Returns the joint to rotate according to the fsm state More...
 
- Properties inherited from PartModule
BaseActionList Actions [get]
 
int ClassID [get]
 
string ClassName [get]
 
List< AdjusterPartModuleBaseCurrentModuleAdjusterList [get]
 List of all the module adjusters that are currently active on this part module. More...
 
BaseEventList Events [get]
 
BaseFieldList Fields [get]
 
string GUIName [get]
 
bool HasAdjusters [get]
 Has this part module been adjusted? More...
 
ReflectedAttributes ModuleAttributes [get, set]
 
Part part [get, set]
 
uint PersistentActionsId [get, set]
 A unique identifier for each vessel including from when it was Shipconstruct More...
 
uint PersistentId [get]
 A unique identifier for each vessel including from when it was Shipconstruct More...
 
Vessel vessel [get]
 

Additional Inherited Members

- Public Types inherited from PartModule
enum  PartUpgradeState { PartUpgradeState.NONE, PartUpgradeState.LOCKED, PartUpgradeState.AVAILABLE }
 
enum  StartState {
  StartState.None = 0, StartState.Editor = 1, StartState.PreLaunch = 2, StartState.Landed = 4,
  StartState.Docked = 8, StartState.Flying = 16, StartState.Splashed = 32, StartState.SubOrbital = 64,
  StartState.Orbital = 128
}
 
- Static Public Member Functions inherited from PartModule
static ReflectedAttributes GetReflectedAttributes (Type partModuleType)
 
static PartUpgradeState UpgradesAvailable (Part part)
 Returns true if at least one module on the part has at least one upgrade available (isUnlocked) More...
 
static PartUpgradeState UpgradesAvailable (Part part, ConfigNode node)
 Returns true if at least one module on the part has at least one upgrade available (isUnlocked) More...
 
- Static Public Attributes inherited from PartModule
static voidPMApplyNodeDelegate ApplyUpgradeNodeDel
 
static boolPMApplyUpgrades ApplyUpgradesDel
 
static bool ApplyUpgradesEditorAuto = true
 
static boolPMBoolDelegate FindUpgradesDel
 
static voidPMNodeDelegate LoadExpansionNodes
 Hook for loading extra nodes common to all part modules. More...
 
static voidPMNodeDelegate LoadUpgradesDel
 
static voidPMNodeDelegate SaveExpansionNodes
 Hook for saving extra nodes common to all part modules. More...
 
static voidPMDelegate SetupExpansion
 Hook for performing extra setup common to all part modules. More...
 
static string UpgradesAvailableString = "#autoLOC_6002273"
 
static string UpgradesLockedString = "#autoLOC_6002274"
 
- Static Protected Attributes inherited from PartModule
static Dictionary< string,
ConfigNode
exclusives = new Dictionary<string, ConfigNode>()
 
static Dictionary< Type,
ReflectedAttributes
reflectedAttributeCache = new Dictionary<Type, ReflectedAttributes>()
 

Member Function Documentation

virtual void ModuleDockingNode.ApplyCoordsUpdate ( )
inlineprotectedvirtual

Applies Part Coordinate Updates. Can be overridden to apply appropriate changes to Part positions/rotations and components (servo transforms within a Part). Will be called when a Part is Unpacked, Vessel is Modified, and just before a ShipConstruct is saved.

virtual void ModuleDockingNode.CalculateResourceDrain ( )
inlineprotectedvirtual

Calculates the current resource drain rate and determines if there's still enough

Returns
bool ModuleDockingNode.CheckContractObjectiveValidity ( )
inline

Whether this particular module is valid for this objective. For example, leg wheels versus rover wheels.

Returns
If the module is valid.

Implements IContractObjectiveModule.

bool ModuleDockingNode.CheckDockContact ( ModuleDockingNode  m1,
ModuleDockingNode  m2,
float  minDist,
float  minFwdDot,
float  minRollDot 
)
inline

Check if two docking nodes are positioned and oriented such that they are able to connect.

Parameters
m1One of the nodes on the operation
m2The other node on the operation
minDistThe minimum distance threshold between them
minFwdDotThe minimum value for a dot product between their (abs'ed) forward vectors
minRollDotThe minimum value for a dot product between their up vectors
Returns
True if contact is possible, false if not

< get the angle between the two nodes' up vectors

bool ModuleDockingNode.CrossfeedToggleableEditor ( )
inline
bool ModuleDockingNode.CrossfeedToggleableFlight ( )
inline
void ModuleDockingNode.Decouple ( )
inline
void ModuleDockingNode.DecoupleAction ( KSPActionParam  param)
inline
override void ModuleDockingNode.DemoteToPhysicslessPart ( )
inlinevirtual

This method will be called from Part class DemoteToPhysicslessPart when the part is being converted from physical to physicsless part. It is called before the joints and rigidbodies are destroyed.

Reimplemented from PartModule.

void ModuleDockingNode.DestroySameVesselJoint ( )
inline
void ModuleDockingNode.DisableXFeed ( )
inline
void ModuleDockingNode.DisableXFeedAction ( KSPActionParam  param)
inline
void ModuleDockingNode.DisengageNodeLock ( )
inline

Disengage the Rotation Lock on this part

void ModuleDockingNode.DockToSameVessel ( ModuleDockingNode  node)
inline
void ModuleDockingNode.DockToVessel ( ModuleDockingNode  node)
inline

< store docked vessel info for both sides

< snap both vessels to their pristine positions and rotations

< move the vessel to meet the other node. Note this changes part position.

< only then do we translate the vessel. Otherwise, the nodes offset will be incorrect.

< couple to the other vessel

< if the old vessel was the active one, switch focus to the new vessel

void ModuleDockingNode.EnableXFeed ( )
inline
void ModuleDockingNode.EnableXFeedAction ( KSPActionParam  param)
inline
bool ModuleDockingNode.EngageNodeLock ( )
inline

Engage the Rotation Lock on this part

Returns
True if the part was stopped and the lock was engaged
ModuleDockingNode ModuleDockingNode.FindNodeApproaches ( )
inline

< FIXME should we be smarter here?

ModuleDockingNode ModuleDockingNode.FindOtherNode ( )
inline
void ModuleDockingNode.FixedUpdate ( )
inline
bool ModuleDockingNode.GetActiveTargetable ( )
inline

Implements ITargetable.

List<PartResourceDefinition> ModuleDockingNode.GetConsumedResources ( )
inline

Implements IResourceConsumer.

string ModuleDockingNode.GetContractObjectiveType ( )
inline

Gets the string identifier for this contract type. Stock contracts use ContractDefs constants, but could be used for non-stock contracts.

Returns
A string identifier for this type of objective.

Implements IContractObjectiveModule.

string ModuleDockingNode.GetDisplayName ( )
inline

Implements ITargetable.

ModuleDockingNode ModuleDockingNode.GetDominantNode ( ModuleDockingNode  m1,
ModuleDockingNode  m2 
)
inline

Find the dominant node in a same-vessel dock situation. The secondary node will create the joint.

Vector3 ModuleDockingNode.GetFwdVector ( )
inline

Implements ITargetable.

override string ModuleDockingNode.GetInfo ( )
inlinevirtual

Returns formatted string of additional data for use in the VAB and SPH

Returns

Reimplemented from PartModule.

override string ModuleDockingNode.GetModuleDisplayName ( )
inlinevirtual

Override this to provide a Localized version of the PartModules Name for UI components

Returns

Reimplemented from PartModule.

string ModuleDockingNode.GetName ( )
inline

Implements ITargetable.

Vector3 ModuleDockingNode.GetObtVelocity ( )
inline

Implements ITargetable.

Orbit ModuleDockingNode.GetOrbit ( )
inline

Implements ITargetable.

OrbitDriver ModuleDockingNode.GetOrbitDriver ( )
inline

Implements ITargetable.

Vector3 ModuleDockingNode.GetRotationAxis ( )
inlineprotected

Returns the axis of rotation

Returns
Vector3 ModuleDockingNode.GetSrfVelocity ( )
inline

Implements ITargetable.

int ModuleDockingNode.GetStageIndex ( int  fallback)
inline

Implements IStageSeparator.

override string ModuleDockingNode.GetStagingDisableText ( )
inlinevirtual

Reimplemented from PartModule.

override string ModuleDockingNode.GetStagingEnableText ( )
inlinevirtual

Reimplemented from PartModule.

VesselTargetModes ModuleDockingNode.GetTargetingMode ( )
inline

Implements ITargetable.

Transform ModuleDockingNode.GetTransform ( )
inline

Implements ITargetable.

Vessel ModuleDockingNode.GetVessel ( )
inline

Implements ITargetable.

bool ModuleDockingNode.IsAdjusterBlockingUndock ( )
inlineprotected

Is there an adjuster attached to this module that will prevent the Undock action

Returns
bool ModuleDockingNode.IsJointUnlocked ( )
inline

Return the part joint state

Returns

Implements IJointLockState.

override bool ModuleDockingNode.IsStageable ( )
inlinevirtual

Should this module be counted when seeing whether to have a stack icon present? Override in a module for custom behavior; otherwise returns true if the module (or something the module inherits from above PartModule itself) overrides OnActive()

Reimplemented from PartModule.

IEnumerator ModuleDockingNode.lateFSMStart ( PartModule.StartState  st)
inline
void ModuleDockingNode.LateUpdate ( )
inline
void ModuleDockingNode.MakePrimary ( )
inline
void ModuleDockingNode.MakeReferenceToggle ( KSPActionParam  act)
inline
void ModuleDockingNode.MakeReferenceTransform ( )
inline
void ModuleDockingNode.ModifyLocked ( object  obj)
inlineprotected
bool ModuleDockingNode.NodeIsTooFar ( )
inline
override void ModuleDockingNode.OnActive ( )
inlinevirtual

Called when the part is set active (after unpacking etc)

Reimplemented from PartModule.

override void ModuleDockingNode.OnAwake ( )
inlinevirtual

Method fires once the module has been added to the part. Use for first time setup. Module will not have loaded fully by this point

< duplicate from onstart, but eh.

Reimplemented from PartModule.

void ModuleDockingNode.OnConstructionAttach ( )
inline
virtual void ModuleDockingNode.OnDestroy ( )
inlineprotectedvirtual
override void ModuleDockingNode.OnInitialize ( )
inlinevirtual

Called on all modules after all parts are loaded but before they give the ship to the game

Reimplemented from PartModule.

override void ModuleDockingNode.OnInventoryModeDisable ( )
inlinevirtual

This method will be called when this modules part and itself is first disabled (when it is not attached to a vessel) when created in Inventory/Construction mode.

Reimplemented from PartModule.

override void ModuleDockingNode.OnInventoryModeEnable ( )
inlinevirtual

This method will be called when this modules part and itself is first enabled (when it is attached to a vessel) when created in Inventory/Construction mode.

Reimplemented from PartModule.

override void ModuleDockingNode.OnLoad ( ConfigNode  node)
inlinevirtual

Use OnLoad to load any additional data from the ConfigNode provided

Parameters
node

Reimplemented from PartModule.

override void ModuleDockingNode.OnModuleAdjusterAdded ( AdjusterPartModuleBase  adjuster)
inlineprotectedvirtual

Perform processing specific to this part module when an adjuster is added.

Parameters
adjusterAdjuster which will be applied to part module.

Reimplemented from PartModule.

override void ModuleDockingNode.OnModuleAdjusterRemoved ( AdjusterPartModuleBase  adjuster)
inlinevirtual

Perform processing specific to this part module when an adjuster is removed.

Parameters
adjusterAdjuster which is being removed from part module.

Reimplemented from PartModule.

void ModuleDockingNode.OnOtherNodeSameVesselDisconnect ( )
inline
void ModuleDockingNode.OnOtherNodeUndock ( )
inline
void ModuleDockingNode.OnPartMenuClose ( Part  inpPart)
inlineprotected
void ModuleDockingNode.OnPartMenuOpen ( UIPartActionWindow  window,
Part  inpPart 
)
inlineprotected
override void ModuleDockingNode.OnSave ( ConfigNode  node)
inlinevirtual

Use OnSave to serialize additional module information into the ConfigNode provided

Parameters
node

Reimplemented from PartModule.

override void ModuleDockingNode.OnStart ( PartModule.StartState  st)
inline
override void ModuleDockingNode.OnStartFinished ( StartState  state)
inlinevirtual

Called when the part finishes starting. The StartState gives an indication of where in flight you are. All values may not be plugged in!

Parameters
state

Reimplemented from PartModule.

override void ModuleDockingNode.PromoteToPhysicalPart ( )
inlinevirtual

This method will be called from Part class PromoteToPhysicalPart when the part is being converted from physicsless to physical part.

Reimplemented from PartModule.

virtual void ModuleDockingNode.RecurseCoordUpdate ( Part  p,
Part  rootPart 
)
inlineprotectedvirtual

Sets Part orgPos and orgRot. Is called at the end of ApplyCoordsUpdate().

Parameters
pThe Part
destPosThe Destination Position
destRotThe Destination Rotation
pivotThe pivot position
void ModuleDockingNode.ServoDisgageLockAction ( KSPActionParam  param)
inlineprotected
void ModuleDockingNode.ServoEngageLockAction ( KSPActionParam  param)
inlineprotected
void ModuleDockingNode.SetAsTarget ( )
inline
Quaternion ModuleDockingNode.SetTargetRotation ( Quaternion  startingRotation,
float  rotationAngle,
bool  setRotation 
)
inlineprotected
Quaternion ModuleDockingNode.SetTargetRotation ( Quaternion  startingRotation,
float  rotationAngle,
bool  setRotation,
Vector3  rotationAxis 
)
inlineprotected
void ModuleDockingNode.SetupFSM ( )
inline

< set up fuel xfeed

< unset fuel lookup targets

override bool ModuleDockingNode.StagingEnabled ( )
inlinevirtual

Gets current staging status (is staging enabled for this module) Override me!

Returns
True iff staging enabled for this module

Reimplemented from PartModule.

override bool ModuleDockingNode.StagingToggleEnabledEditor ( )
inlinevirtual

Reimplemented from PartModule.

override bool ModuleDockingNode.StagingToggleEnabledFlight ( )
inlinevirtual

Reimplemented from PartModule.

void ModuleDockingNode.ToggleLockedAction ( KSPActionParam  param)
inlineprotected
void ModuleDockingNode.ToggleXFeedAction ( KSPActionParam  param)
inline
void ModuleDockingNode.Undock ( )
inline

< switch focus to the undocked craft if we were focused on the previous vessel

void ModuleDockingNode.UndockAction ( KSPActionParam  param)
inline
void ModuleDockingNode.UndockSameVessel ( )
inline
void ModuleDockingNode.UnsetTarget ( )
inline
void ModuleDockingNode.Update ( )
inline
void ModuleDockingNode.UpdateAlignmentRotation ( )
inlineprotected

Updates the alignment rotation of this dock, called on FixedUpdate

virtual void ModuleDockingNode.UpdatePAWUI ( )
inlineprotectedvirtual
IEnumerator ModuleDockingNode.WaitAndSwitchFocus ( )
inline

Member Data Documentation

float ModuleDockingNode.acquireForce = 2f
float ModuleDockingNode.acquireForceTweak = 100f
float ModuleDockingNode.acquireMinFwdDot = 0.7f
float ModuleDockingNode.acquireMinRollDot = float.MinValue
float ModuleDockingNode.acquireRange = 0.5f
float ModuleDockingNode.acquireTorque = 2f
float ModuleDockingNode.acquireTorqueRoll = 0f
bool ModuleDockingNode.animCaptureOff = false
bool ModuleDockingNode.animDisabledEnter = true
bool ModuleDockingNode.animDisabledExit = true
bool ModuleDockingNode.animDisableIfNot1 = true
bool ModuleDockingNode.animDisengageEnter = true
bool ModuleDockingNode.animDisengageExit = true
bool ModuleDockingNode.animEnableIf1 = true
bool ModuleDockingNode.animReadyEnter = true
bool ModuleDockingNode.animReadyExit = true
bool ModuleDockingNode.animUndockOn = false
float ModuleDockingNode.baseResourceConsumptionRate = 0.02f

Base resource consumption on motor output when the servo is moving

bool ModuleDockingNode.canRotate = false

Indicates wether or not player can rotate this docking port, defaults to false to acomodate mods

float ModuleDockingNode.captureMaxRvel = 0.3f
float ModuleDockingNode.captureMinFwdDot = 0.998f
float ModuleDockingNode.captureMinRollDot = float.MinValue
float ModuleDockingNode.captureRange = 0.06f
Transform ModuleDockingNode.controlTransform
string ModuleDockingNode.controlTransformName = ""
bool ModuleDockingNode.crossfeed = true
bool ModuleDockingNode.DebugFSMState

If set to true will log FSM state and event changes.

int ModuleDockingNode.deployAnimationController = -1
float ModuleDockingNode.deployAnimationTarget = 1f
ModuleAnimateGeneric ModuleDockingNode.deployAnimator
uint ModuleDockingNode.dockedPartUId
int ModuleDockingNode.dockingNodeModuleIndex
float ModuleDockingNode.efficiency = 0.75f

Servo efficiency (1 = 100%)

BaseEvent ModuleDockingNode.evtSetAsTarget
KerbalFSM ModuleDockingNode.fsm
bool ModuleDockingNode.gendered = false
bool ModuleDockingNode.genderFemale = true
Vector2 ModuleDockingNode.hardMinMaxLimits = new Vector2(-15, 15)

The angle range that's defined by the physical limits of the part model and/or the part's designer. A player must not be able to set an angle beyond this range.

bool ModuleDockingNode.hasEnoughResources = true
protected
bool ModuleDockingNode.inverted

Setting this true will make the target angle be the invert of the chosen angle

You will see it travel across the angle limit from the opposite direction

SoftJointLimit ModuleDockingNode.lowerRotationLimit
protected
float ModuleDockingNode.maxAnglePerFrame
float ModuleDockingNode.maxMotorOutput = 100f

This is the Drive Spring Multiplier. The Joint X Drive position spring is set to: driveSpringMultiplier * torqueLimit

float ModuleDockingNode.minDistanceToReEngage = 1f
float ModuleDockingNode.motorRate
protected

Rate for calculating resource drain

bool ModuleDockingNode.nodeIsLocked = false

Is the servo motor receiving power and engaged with the joint

Transform ModuleDockingNode.nodeTransform
string ModuleDockingNode.nodeTransformName = "dockingNode"
string ModuleDockingNode.nodeType = "size1"
HashSet<string> ModuleDockingNode.nodeTypes
KFSMEvent ModuleDockingNode.on_nodeApproach
ModuleDockingNode ModuleDockingNode.otherNode
string ModuleDockingNode.referenceAttachNode = ""
float ModuleDockingNode.referenceConsumptionVelocity = 180f

The transform velocity (angular or positional) at which the resource consumption is 1 x the baseResourceConsumptionRate

AttachNode ModuleDockingNode.referenceNode
string ModuleDockingNode.rotationAxis = "Z"

The rotation axis, defaulted to the z axis. This is necessary as some docks might have a different rotation axis. Can be "X", "X-", "Y", "Y-" or "Z", "Z-".

string ModuleDockingNode.rotationTransformName

Name of the transform that will rotate

PartJoint ModuleDockingNode.sameVesselDockJoint
bool ModuleDockingNode.setAnimWrite = true
bool ModuleDockingNode.setStagingState = true
protected
float ModuleDockingNode.snapOffset = 90f
bool ModuleDockingNode.snapRotation = false
KFSMState ModuleDockingNode.st_ready
bool ModuleDockingNode.staged = true
string ModuleDockingNode.state = "Ready"
float ModuleDockingNode.targetAngle = 0f

This is the desired current Target Angle set by the user.

BaseAxisField ModuleDockingNode.targetAngleAxisField
protected
UI_FloatRange ModuleDockingNode.targetAngleUIField
protected
double ModuleDockingNode.TatUndock
float ModuleDockingNode.traverseVelocity = 2.5f

The traverse speed (in deg/s for rotational motion)

float ModuleDockingNode.undockEjectionForce = 10f
SoftJointLimit ModuleDockingNode.upperRotationLimit
protected
bool ModuleDockingNode.useReferenceAttachNode = false
DockedVesselInfo ModuleDockingNode.vesselInfo

Property Documentation

bool ModuleDockingNode.IsDisabled
get
bool ModuleDockingNode.IsRotating
getset

Is this dock currently rotating

float ModuleDockingNode.JointTargetAngle
get

This is the target for the joint drive after applying any logic like inversion/offsets and clamping between the limits

ConfigurableJoint ModuleDockingNode.RotationJoint
get

Returns the joint to rotate according to the fsm state


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