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 | Protected Attributes | Properties | List of all members
Expansions.Serenity.ModuleRoboticController Class Reference

A Controller module for managing KSPAxisField/KSPAction values over time More...

Inheritance diagram for Expansions.Serenity.ModuleRoboticController:
PartModule IShipConstructIDChanges IResourceConsumer

Public Types

enum  SequenceDirectionOptions { SequenceDirectionOptions.Forward, SequenceDirectionOptions.Reverse }
 What direction the sequence is playing in More...
 
enum  SequenceLoopOptions { SequenceLoopOptions.Once, SequenceLoopOptions.Repeat, SequenceLoopOptions.PingPong, SequenceLoopOptions.OnceRestart }
 What happens when the sequence hits the end More...
 
- 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
}
 

Public Member Functions

void AddPartAction (Part part, PartModule module, BaseAction action)
 Add a new Part/action combination to this controller More...
 
void AddPartAxis (Part part, PartModule module, BaseAxisField axisField)
 Add a new Part/axisField combination to this controller More...
 
void CycleLoopMode ()
 Change to the next Loop Mode More...
 
void FixedUpdate ()
 
List< PartResourceDefinitionGetConsumedResources ()
 
override string GetInfo ()
 Returns formatted string of additional data for use in the VAB and SPH More...
 
override string GetModuleDisplayName ()
 Returns the display name for the module. More...
 
bool HasPart (List< Part > testParts)
 Does this controller have any axisfield from any of the parts in the supplied list attached More...
 
bool HasPart (Part testPart)
 Does this controller have any axisfield from this part attached More...
 
bool HasPartAction (Part testPart, BaseAction testAction)
 Does this controller have this action from this part attached More...
 
bool HasPartAxisField (Part testPart, BaseAxisField testAxisField)
 Does this controller have this axisfield from this part attached More...
 
bool HasPartSymmetryAction (Part testPart, BaseAction testAction)
 Does this controller have this action from a symmetry partner More...
 
bool HasPartSymmetryAxisField (Part testPart, BaseAxisField testAxisField)
 Does this controller have this axisfield from this part attached More...
 
bool isSameActionId (Part testPart, ControlledAction cAction)
 
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...
 
override void OnLoad (ConfigNode node)
 Use OnLoad to load any additional data from the ConfigNode provided More...
 
override void OnSave (ConfigNode node)
 Temp var used between Load and Start More...
 
override 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...
 
override void OnUpdate ()
 Called every frame that the part is active More...
 
void OpenControllerEditor ()
 Event to open the Editor window More...
 
void PartDeleted (Part part)
 Remove all Axes for a Part from this controller More...
 
void RemovePartAction (Part part, BaseAction action, bool transferToSymPartner)
 Remove a Part/Actions Combination from this controller More...
 
void RemovePartAction (ControlledAction action, bool transferToSymPartner)
 
void RemovePartAxis (Part part, BaseAxisField axisField, bool transferToSymPartner)
 Remove a Part/AxisField Combination from this controller More...
 
void RemovePartAxis (ControlledAxis axis, bool transferToSymPartner)
 Remove a Part/AxisField Combination from this controller More...
 
void RemovePartSymmetry (uint oldPartId)
 Remove this partID form all Control Axes/Actions Symmetry lists More...
 
void SequencePlay ()
 Play the Sequence More...
 
void SequenceStop ()
 Stop the Sequence More...
 
void SetDirection (SequenceDirectionOptions newDirection)
 Change the direction the sequence is playing in More...
 
void SetDisplayName (string newName)
 Change the DisplayName of the controller More...
 
void SetLength (float newLength)
 Adjust the length of the sequence More...
 
void SetLength (float newLength, bool maintainPointsTime)
 Adjust the length of the sequence More...
 
void SetLoopMode (SequenceLoopOptions newMode)
 Change to the next Loop Mode More...
 
void SetPlaySpeed (float newSpeed)
 Change the play speed of teh controller More...
 
void SetSequencePosition (float newPosition)
 Change the position of the sequence More...
 
void SetSequencePositionEnd ()
 Change the position of the sequence to the end point More...
 
void SetSequencePositionNextKey ()
 Change the position of the sequence to the closest next key on any axes More...
 
void SetSequencePositionPrevKey ()
 Change the position of the sequence to the closest previous key on any axes More...
 
void SetSequencePositionStart ()
 Change the position of the sequence to the start point More...
 
void ToggleControllerEnabled ()
 Toggles the controller to be enabled or disabled, on if it was off, off if it was on More...
 
void ToggleControllerEnabled (bool enabled)
 Toggles the controller to be enabled or disabled More...
 
void ToggleDirection ()
 Change the direction the sequence is playing in More...
 
void TogglePlay ()
 Toggle between play and pause More...
 
void TogglePlay (bool play)
 Toggle between play and pause More...
 
bool TryGetPartAction (Part testPart, BaseAction testAction, out ControlledAction action)
 Does this controller have this action from this part attached More...
 
bool TryGetPartAction (Part testPart, BaseAction testAction, out ControlledAction action, out bool symmetryPartner)
 Does this controller have this action from this part attached More...
 
bool TryGetPartAxisField (Part testPart, BaseAxisField testAxisField, out ControlledAxis axis)
 Does this controller have this axisfield from this part attached More...
 
bool TryGetPartAxisField (Part testPart, BaseAxisField testAction, out ControlledAxis action, out bool symmetryPartner)
 Does this controller have this action from this part attached More...
 
void UpdatePartSymmetry (Part part)
 Update the SymmetryFields on this parts Control Axes/Actions More...
 
- 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 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...
 
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 GetStagingDisableText ()
 
virtual string GetStagingEnableText ()
 
virtual string GetUpgradeInfo ()
 Called by Upgrade Stats dialog More...
 
bool HasUpgrades ()
 Returns true if upgrades exist for the partmodule More...
 
virtual 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...
 
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 OnActive ()
 Called when the part is set active (after unpacking etc) 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...
 
virtual void OnInitialize ()
 Called on all modules after all parts are loaded but before they give the ship to the game More...
 
virtual 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...
 
virtual 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...
 
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 OnModuleAdjusterRemoved (AdjusterPartModuleBase adjuster)
 Perform processing specific to this part module when an adjuster is removed. By default this does nothing is up to each part module to implement it properly. 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 OnStartBeforePartAttachJoint (StartState state)
 Called in flight scene in Part.Start just before the Part attachnode joints are created. More...
 
virtual 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...
 
virtual void OnStoredInInventory (ModuleInventoryPart moduleInventoryPart)
 Called when the part is stored in an inventory. 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 ()
 
virtual void PromoteToPhysicalPart ()
 This method will be called from Part class PromoteToPhysicalPart when the part is being converted from physicsless to physical part. More...
 
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...
 
virtual bool StagingEnabled ()
 Gets current staging status (is staging enabled for this module) Override me! More...
 
virtual bool StagingToggleEnabledEditor ()
 
virtual bool StagingToggleEnabledFlight ()
 
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

bool controllerEnabled = true
 
string displayName
 The displayName of the Controller More...
 
- 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

void PlaySequenceAction (KSPActionParam param)
 
void SequenceForwardAction (KSPActionParam param)
 
void SequenceLoopOnceAction (KSPActionParam param)
 
void SequenceLoopOnceRestartAction (KSPActionParam param)
 
void SequenceLoopPingPongAction (KSPActionParam param)
 
void SequenceLoopRepeatAction (KSPActionParam param)
 
void SequencePlaySpeedFullAction (KSPActionParam param)
 
void SequencePlaySpeedZeroAction (KSPActionParam param)
 
void SequenceReverseAction (KSPActionParam param)
 
void StopSequenceAction (KSPActionParam param)
 
void ToggleControllerEnabledAction (KSPActionParam param)
 
void ToggleControllerEnabledOff (KSPActionParam param)
 
void ToggleControllerEnabledOn (KSPActionParam param)
 
void ToggleDirectionAction (KSPActionParam param)
 
void ToggleLoopModeAction (KSPActionParam param)
 
void TogglePlayAction (KSPActionParam param)
 
- 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 OnModuleAdjusterAdded (AdjusterPartModuleBase adjuster)
 Perform processing specific to this part module when an adjuster is added. By default this does nothing is up to each part module to implement it properly. More...
 
virtual void SaveUpgradesApplied (ConfigNode node)
 Save the applied upgrades. More...
 
IEnumerator UpgradeWaitForScenarioModules ()
 

Protected Attributes

int actionsCount
 How many actions have been assigned to the controller More...
 
int fieldsCount
 How many axes have been assigned to the controller More...
 
int priority
 
float priorityField = 3
 
int sequenceDirectionIndex
 
float sequenceLength = 5
 
int sequenceLoopIndex
 
int sequencePlayingIndex = 1
 
float sequencePlaySpeed = 100
 
float sequencePosition
 

Properties

List< ControlledAxisAxes [get]
 List of part/axisField combos that are being controlled More...
 
List< ControlledActionControlledActions [get]
 List of part/action combos that are being controlled More...
 
List< ControlledAxisControlledAxes [get]
 List of part/axisField combos that are being controlled More...
 
bool HasWindowDimensions [get, set]
 Has the controller had window dimensions defined More...
 
uint PartPersistentId [get]
 Helper to get the part persistentId More...
 
int Priority [get]
 The Controller Priority for when multiple controllers action the same field More...
 
SequenceDirectionOptions SequenceDirection [get, set]
 Direction the sequence is playing More...
 
bool SequenceIsPlaying [get, set]
 Is the sequence currently playing More...
 
float SequenceLength [get]
 The length of the sequence in Seconds More...
 
SequenceLoopOptions SequenceLoop [get, set]
 Type of Looping More...
 
float SequencePlaySpeed [get]
 The speed of the sequence playback as percentage of time = 100 = full speed More...
 
float SequencePosition [get]
 position of the play head along the time line in seconds More...
 
Vector2 WindowPosition [get]
 Persisted position of the UIWindow for this controller More...
 
Vector2 WindowSize [get]
 Persisted size of the UIWindow for this controller 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

- 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>()
 

Detailed Description

A Controller module for managing KSPAxisField/KSPAction values over time

Member Enumeration Documentation

What direction the sequence is playing in

Enumerator
Forward 
Reverse 

What happens when the sequence hits the end

Enumerator
Once 
Repeat 
PingPong 
OnceRestart 

Member Function Documentation

void Expansions.Serenity.ModuleRoboticController.AddPartAction ( Part  part,
PartModule  module,
BaseAction  action 
)
inline

Add a new Part/action combination to this controller

Parameters
partpart for new ControlledAction
modulemodule for new ControlledAction
actionaction for new ControlledAction
void Expansions.Serenity.ModuleRoboticController.AddPartAxis ( Part  part,
PartModule  module,
BaseAxisField  axisField 
)
inline

Add a new Part/axisField combination to this controller

Parameters
partpart for new ControlledAxis
modulemodule for new ControlledAction
axisFieldfield for new ControlledAxis
void Expansions.Serenity.ModuleRoboticController.CycleLoopMode ( )
inline

Change to the next Loop Mode

void Expansions.Serenity.ModuleRoboticController.FixedUpdate ( )
inline
List<PartResourceDefinition> Expansions.Serenity.ModuleRoboticController.GetConsumedResources ( )
inline

Implements IResourceConsumer.

override string Expansions.Serenity.ModuleRoboticController.GetInfo ( )
inlinevirtual

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

Returns

Reimplemented from PartModule.

override string Expansions.Serenity.ModuleRoboticController.GetModuleDisplayName ( )
inlinevirtual

Returns the display name for the module.

Returns
The display name for the module.

Reimplemented from PartModule.

bool Expansions.Serenity.ModuleRoboticController.HasPart ( List< Part testParts)
inline

Does this controller have any axisfield from any of the parts in the supplied list attached

Parameters
testPartsParts to search for
Returns
True if found
bool Expansions.Serenity.ModuleRoboticController.HasPart ( Part  testPart)
inline

Does this controller have any axisfield from this part attached

Parameters
testPartPart to search for
Returns
True if found
bool Expansions.Serenity.ModuleRoboticController.HasPartAction ( Part  testPart,
BaseAction  testAction 
)
inline

Does this controller have this action from this part attached

Compares persistentId and action name

Parameters
testPartPart to search for
testActionAction to search for
Returns
True if found
bool Expansions.Serenity.ModuleRoboticController.HasPartAxisField ( Part  testPart,
BaseAxisField  testAxisField 
)
inline

Does this controller have this axisfield from this part attached

Compares persistentId and axisField name

Parameters
testPartPart to search for
testAxisFieldAxisField to search for
Returns
True if found
bool Expansions.Serenity.ModuleRoboticController.HasPartSymmetryAction ( Part  testPart,
BaseAction  testAction 
)
inline

Does this controller have this action from a symmetry partner

Compares persistentId and action name

Parameters
testPartPart to search for
testActionAction to search for
Returns
True if found
bool Expansions.Serenity.ModuleRoboticController.HasPartSymmetryAxisField ( Part  testPart,
BaseAxisField  testAxisField 
)
inline

Does this controller have this axisfield from this part attached

Compares persistentId and axisField name

Parameters
testPartPart to search for
testAxisFieldAxisField to search for
Returns
True if found
bool Expansions.Serenity.ModuleRoboticController.isSameActionId ( Part  testPart,
ControlledAction  cAction 
)
inline
override void Expansions.Serenity.ModuleRoboticController.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

Reimplemented from PartModule.

override void Expansions.Serenity.ModuleRoboticController.OnLoad ( ConfigNode  node)
inlinevirtual

Use OnLoad to load any additional data from the ConfigNode provided

Parameters
node

Reimplemented from PartModule.

override void Expansions.Serenity.ModuleRoboticController.OnSave ( ConfigNode  node)
inlinevirtual

Temp var used between Load and Start

Reimplemented from PartModule.

override void Expansions.Serenity.ModuleRoboticController.OnStart ( StartState  state)
inlinevirtual

Called when the part starts. 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 Expansions.Serenity.ModuleRoboticController.OnUpdate ( )
inlinevirtual

Called every frame that the part is active

Reimplemented from PartModule.

void Expansions.Serenity.ModuleRoboticController.OpenControllerEditor ( )
inline

Event to open the Editor window

void Expansions.Serenity.ModuleRoboticController.PartDeleted ( Part  part)
inline

Remove all Axes for a Part from this controller

Parameters
partpart for existing ControlledAxis/Action to be removed
void Expansions.Serenity.ModuleRoboticController.PlaySequenceAction ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.RemovePartAction ( Part  part,
BaseAction  action,
bool  transferToSymPartner 
)
inline

Remove a Part/Actions Combination from this controller

Parameters
partpart for existing ControlledAction to be removed
actionaction for existing ControlledAction to be removed. Pass Null to remove all actions for a part
transferToSymPartnerIf there is a symmetry partner transfer the Controlled Action to it instead of deleting the action
void Expansions.Serenity.ModuleRoboticController.RemovePartAction ( ControlledAction  action,
bool  transferToSymPartner 
)
inline
void Expansions.Serenity.ModuleRoboticController.RemovePartAxis ( Part  part,
BaseAxisField  axisField,
bool  transferToSymPartner 
)
inline

Remove a Part/AxisField Combination from this controller

Parameters
partpart for existing ControlledAxis to be removed
axisFieldfield for existing ControlledAxis to be removed. Pass Null to remove all axis for a part
transferToSymPartnerIf there is a symmetry partner transfer the Controlled axis to it instead of deleting the axis
void Expansions.Serenity.ModuleRoboticController.RemovePartAxis ( ControlledAxis  axis,
bool  transferToSymPartner 
)
inline

Remove a Part/AxisField Combination from this controller

Parameters
axisAxis to remove
transferToSymPartnerIf there is a symmetry partner transfer the Controlled axis to it instead of deleting the axis
void Expansions.Serenity.ModuleRoboticController.RemovePartSymmetry ( uint  oldPartId)
inline

Remove this partID form all Control Axes/Actions Symmetry lists

Parameters
oldPartIdthe PersistentPartID to remove
void Expansions.Serenity.ModuleRoboticController.SequenceForwardAction ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.SequenceLoopOnceAction ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.SequenceLoopOnceRestartAction ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.SequenceLoopPingPongAction ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.SequenceLoopRepeatAction ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.SequencePlay ( )
inline

Play the Sequence

void Expansions.Serenity.ModuleRoboticController.SequencePlaySpeedFullAction ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.SequencePlaySpeedZeroAction ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.SequenceReverseAction ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.SequenceStop ( )
inline

Stop the Sequence

void Expansions.Serenity.ModuleRoboticController.SetDirection ( SequenceDirectionOptions  newDirection)
inline

Change the direction the sequence is playing in

Parameters
newDirectionThe new direction to play in
void Expansions.Serenity.ModuleRoboticController.SetDisplayName ( string  newName)
inline

Change the DisplayName of the controller

void Expansions.Serenity.ModuleRoboticController.SetLength ( float  newLength)
inline

Adjust the length of the sequence

Parameters
newLengthnew length in seconds
void Expansions.Serenity.ModuleRoboticController.SetLength ( float  newLength,
bool  maintainPointsTime 
)
inline

Adjust the length of the sequence

Parameters
newLengthnew length in seconds
maintainPointsTimeShoudl we maintain the time position of the points
void Expansions.Serenity.ModuleRoboticController.SetLoopMode ( SequenceLoopOptions  newMode)
inline

Change to the next Loop Mode

void Expansions.Serenity.ModuleRoboticController.SetPlaySpeed ( float  newSpeed)
inline

Change the play speed of teh controller

Parameters
newSpeedPercentade of time = 100% = full speed
void Expansions.Serenity.ModuleRoboticController.SetSequencePosition ( float  newPosition)
inline

Change the position of the sequence

Parameters
newPositionNew position in seconds
void Expansions.Serenity.ModuleRoboticController.SetSequencePositionEnd ( )
inline

Change the position of the sequence to the end point

void Expansions.Serenity.ModuleRoboticController.SetSequencePositionNextKey ( )
inline

Change the position of the sequence to the closest next key on any axes

void Expansions.Serenity.ModuleRoboticController.SetSequencePositionPrevKey ( )
inline

Change the position of the sequence to the closest previous key on any axes

void Expansions.Serenity.ModuleRoboticController.SetSequencePositionStart ( )
inline

Change the position of the sequence to the start point

void Expansions.Serenity.ModuleRoboticController.StopSequenceAction ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.ToggleControllerEnabled ( )
inline

Toggles the controller to be enabled or disabled, on if it was off, off if it was on

void Expansions.Serenity.ModuleRoboticController.ToggleControllerEnabled ( bool  enabled)
inline

Toggles the controller to be enabled or disabled

void Expansions.Serenity.ModuleRoboticController.ToggleControllerEnabledAction ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.ToggleControllerEnabledOff ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.ToggleControllerEnabledOn ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.ToggleDirection ( )
inline

Change the direction the sequence is playing in

void Expansions.Serenity.ModuleRoboticController.ToggleDirectionAction ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.ToggleLoopModeAction ( KSPActionParam  param)
inlineprotected
void Expansions.Serenity.ModuleRoboticController.TogglePlay ( )
inline

Toggle between play and pause

void Expansions.Serenity.ModuleRoboticController.TogglePlay ( bool  play)
inline

Toggle between play and pause

Parameters
playTrue to set the controller playing
void Expansions.Serenity.ModuleRoboticController.TogglePlayAction ( KSPActionParam  param)
inlineprotected
bool Expansions.Serenity.ModuleRoboticController.TryGetPartAction ( Part  testPart,
BaseAction  testAction,
out ControlledAction  action 
)
inline

Does this controller have this action from this part attached

Compares persistentId and axisField name

Parameters
testPartPart to search for
testActionAction to search for
actionThe found action
Returns
True if found
bool Expansions.Serenity.ModuleRoboticController.TryGetPartAction ( Part  testPart,
BaseAction  testAction,
out ControlledAction  action,
out bool  symmetryPartner 
)
inline

Does this controller have this action from this part attached

Compares persistentId and axisField name

Parameters
testPartPart to search for
testActionAction to search for
actionThe found action
symmetryPartnerThe found action is from a symmetry partner, not this part directly
Returns
True if found
bool Expansions.Serenity.ModuleRoboticController.TryGetPartAxisField ( Part  testPart,
BaseAxisField  testAxisField,
out ControlledAxis  axis 
)
inline

Does this controller have this axisfield from this part attached

Compares persistentId and axisField name

Parameters
testPartPart to search for
testAxisFieldAxisField to search for
axisThe found axis
Returns
True if found
bool Expansions.Serenity.ModuleRoboticController.TryGetPartAxisField ( Part  testPart,
BaseAxisField  testAction,
out ControlledAxis  action,
out bool  symmetryPartner 
)
inline

Does this controller have this action from this part attached

Compares persistentId and axisField name

Parameters
testPartPart to search for
testActionAction to search for
actionThe found action
symmetryPartnerThe found action is from a symmetry partner, not this part directly
Returns
True if found
void Expansions.Serenity.ModuleRoboticController.UpdatePartSymmetry ( Part  part)
inline

Update the SymmetryFields on this parts Control Axes/Actions

Parameters
partThe part to update

Member Data Documentation

int Expansions.Serenity.ModuleRoboticController.actionsCount
protected

How many actions have been assigned to the controller

bool Expansions.Serenity.ModuleRoboticController.controllerEnabled = true
string Expansions.Serenity.ModuleRoboticController.displayName

The displayName of the Controller

int Expansions.Serenity.ModuleRoboticController.fieldsCount
protected

How many axes have been assigned to the controller

int Expansions.Serenity.ModuleRoboticController.priority
protected
float Expansions.Serenity.ModuleRoboticController.priorityField = 3
protected
int Expansions.Serenity.ModuleRoboticController.sequenceDirectionIndex
protected
float Expansions.Serenity.ModuleRoboticController.sequenceLength = 5
protected
int Expansions.Serenity.ModuleRoboticController.sequenceLoopIndex
protected
int Expansions.Serenity.ModuleRoboticController.sequencePlayingIndex = 1
protected
float Expansions.Serenity.ModuleRoboticController.sequencePlaySpeed = 100
protected
float Expansions.Serenity.ModuleRoboticController.sequencePosition
protected

Property Documentation

List<ControlledAxis> Expansions.Serenity.ModuleRoboticController.Axes
get

List of part/axisField combos that are being controlled

List<ControlledAction> Expansions.Serenity.ModuleRoboticController.ControlledActions
get

List of part/action combos that are being controlled

List<ControlledAxis> Expansions.Serenity.ModuleRoboticController.ControlledAxes
get

List of part/axisField combos that are being controlled

bool Expansions.Serenity.ModuleRoboticController.HasWindowDimensions
getset

Has the controller had window dimensions defined

uint Expansions.Serenity.ModuleRoboticController.PartPersistentId
get

Helper to get the part persistentId

int Expansions.Serenity.ModuleRoboticController.Priority
get

The Controller Priority for when multiple controllers action the same field

Highest priority wins, multiples of the same priority will average the result

SequenceDirectionOptions Expansions.Serenity.ModuleRoboticController.SequenceDirection
getset

Direction the sequence is playing

bool Expansions.Serenity.ModuleRoboticController.SequenceIsPlaying
getset

Is the sequence currently playing

float Expansions.Serenity.ModuleRoboticController.SequenceLength
get

The length of the sequence in Seconds

SequenceLoopOptions Expansions.Serenity.ModuleRoboticController.SequenceLoop
getset

Type of Looping

float Expansions.Serenity.ModuleRoboticController.SequencePlaySpeed
get

The speed of the sequence playback as percentage of time = 100 = full speed

float Expansions.Serenity.ModuleRoboticController.SequencePosition
get

position of the play head along the time line in seconds

Vector2 Expansions.Serenity.ModuleRoboticController.WindowPosition
get

Persisted position of the UIWindow for this controller

Vector2 Expansions.Serenity.ModuleRoboticController.WindowSize
get

Persisted size of the UIWindow for this controller


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