Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Properties | List of all members
Expansions.Missions.ActionModule Class Reference
Inheritance diagram for Expansions.Missions.ActionModule:
IConfigNode Expansions.Missions.IActionModule IConfigNode Expansions.Missions.IMENodeDisplay Expansions.Missions.Actions.ActionCreateAsteroid Expansions.Missions.Actions.ActionCreateComet Expansions.Missions.Actions.ActionCreateFlag Expansions.Missions.Actions.ActionCreateKerbal Expansions.Missions.Actions.ActionCreateLaunchSite Expansions.Missions.Actions.ActionCreateVessel Expansions.Missions.Actions.ActionDialogMessage Expansions.Missions.Actions.ActionMessage Expansions.Missions.Actions.ActionMissionScore Expansions.Missions.Actions.ActionModifierFunds Expansions.Missions.Actions.ActionPartExplode Expansions.Missions.Actions.ActionPartFailure Expansions.Missions.Actions.ActionPartRepair Expansions.Missions.Actions.ActionPartResourceDrain Expansions.Missions.Actions.ActionSetCamera Expansions.Missions.Actions.ActionVessel Expansions.Missions.Actions.ActionVesselActionGroup Expansions.Missions.Actions.ActionVesselStage

Public Member Functions

virtual Vector3 ActionLocation ()
 Get the Location in world space for this ActionModule. Default will return Vector3.zero. Override to return actual location. More...
 
void AddParameterToNodeBody (string parameter)
 Add a parameter to be displayed in the node body Used for batch processing node body parameters If you want an immediate UI update, use AddParameterToNodeBodyAndUpdateUI More...
 
void AddParameterToNodeBodyAndUpdateUI (string parameter)
 Add a parameter to be displayed in the node body Then updates the UI on the node body More...
 
void AddParameterToSAP (string parameter)
 Add a parameter to be displayed in the Settings Action Pane More...
 
virtual void Awake ()
 
virtual IEnumerator Fire ()
 Run this action More...
 
virtual string GetAppObjectiveInfo ()
 
string GetDisplayName ()
 Get the localized name of the node More...
 
virtual string GetInfo ()
 Get the information to be displayed about the module in the tooltip. More...
 
virtual List< IMENodeDisplayGetInternalParametersToDisplay ()
 Gets some more parameters to display. More...
 
string GetName ()
 Get the name of the action module More...
 
MENode GetNode ()
 Get the linked Mission node. More...
 
virtual string GetNodeBodyParameterString (BaseAPField field)
 Returns the string to be displayed when the parameter is displayed in the node body More...
 
bool HasNodeBodyParameter (string parameter)
 Evaluates if the parameter is present in the node body display parameters More...
 
bool HasSAPParameter (string parameter)
 Evaluates if the parameter is present in the SAP More...
 
virtual void Initialize (MENode node)
 This is called Once when an ActionModule component is instantiated. This is a mandatory Method and will set the MENode reference. Override this method in any action modules that require the MENode reference prior to Awake, but always call the base.Initialize More...
 
virtual void Load (ConfigNode node)
 
virtual void OnCloned (ref ActionModule actionModuleBase)
 
virtual void OnDestroy ()
 
virtual void OnPartPersistentIdChanged (uint vesselID, uint oldId, uint newId)
 Override this function to catch when a parts persistentId is changed, you should use this to update any partID references in your action where the part is in the correct vessel More...
 
virtual void OnVesselPersistentIdChanged (uint oldId, uint newId)
 Override this function to catch when a vessels persistentId is changed, you should use this to update any vesselID references in your action More...
 
virtual void OnVesselsDocking (uint oldId, uint newId)
 Override this function to catch when a Vessel Dock, you should use this to update any partID/Vessel references in your action where the part is in the correct vessel More...
 
virtual void OnVesselsUndocking (Vessel oldVessel, Vessel newVessel)
 Override this function to catch when a parts Vessel is changed, you should use this to update any partID/Vessel references in your action where the part is in the correct vessel More...
 
virtual void ParameterSetupComplete ()
 Can be used as a hook once all the parameters in a module have been setup. More...
 
void RemoveParameterFromNodeBody (string parameter)
 Add a parameter to be displayed in the node body Used for batch processing node body parameters If you want an immediate UI update, use AddParameterToNodeBodyAndUpdateUI More...
 
void RemoveParameterFromNodeBodyAndUpdateUI (string parameter)
 Removes a parameter to be displayed in the node body Then updates the UI on the node body More...
 
void RemoveParameterFromSAP (string parameter)
 Remove a parameter to be displayed in the Settings Action Pane More...
 
virtual void RunValidation (MissionEditorValidator validator)
 Override this to add custom Validation checks and results to this object More...
 
void RunValidationWrapper (MissionEditorValidator validator)
 Called to run the Validation checks for this object. More...
 
virtual void Save (ConfigNode node)
 
void UpdateNodeBodyUI ()
 Updates the node body parameters More...
 
- Public Member Functions inherited from Expansions.Missions.IActionModule
void RunValidationWrapper (Editor.MissionEditorValidator validator)
 

Public Attributes

bool isRunning = false
 Indicates if the coroutine is running. Set to true when Fire() method starts and set to false when it is finished. Used when restartOnSceneLoad is true to restart coroutine for an ActionModule. More...
 
MENode node
 Refernce to the Node that the action is part of More...
 
List< string > parametersDisplayedInSAP
 The parameters displayed in the Settings Action Pane More...
 
bool restartOnSceneLoad = false
 Set to true if this module requires the MissionSystem to restart a Fire() coroutine on scene change. It will only do this if the coroutine was already running before the scene change. More...
 
string title = ""
 The display name for this More...
 

Properties

string name [get, set]
 the name of the module class More...
 

Member Function Documentation

virtual Vector3 Expansions.Missions.ActionModule.ActionLocation ( )
inlinevirtual

Get the Location in world space for this ActionModule. Default will return Vector3.zero. Override to return actual location.

Returns
Vector3 world location

Implements Expansions.Missions.IActionModule.

Reimplemented in Expansions.Missions.Actions.ActionCreateKerbal, Expansions.Missions.Actions.ActionCreateVessel, Expansions.Missions.Actions.ActionCreateFlag, Expansions.Missions.Actions.ActionCreateComet, and Expansions.Missions.Actions.ActionCreateAsteroid.

void Expansions.Missions.ActionModule.AddParameterToNodeBody ( string  parameter)
inline

Add a parameter to be displayed in the node body Used for batch processing node body parameters If you want an immediate UI update, use AddParameterToNodeBodyAndUpdateUI

Implements Expansions.Missions.IMENodeDisplay.

void Expansions.Missions.ActionModule.AddParameterToNodeBodyAndUpdateUI ( string  parameter)
inline

Add a parameter to be displayed in the node body Then updates the UI on the node body

Implements Expansions.Missions.IMENodeDisplay.

void Expansions.Missions.ActionModule.AddParameterToSAP ( string  parameter)
inline

Add a parameter to be displayed in the Settings Action Pane

Implements Expansions.Missions.IMENodeDisplay.

virtual void Expansions.Missions.ActionModule.Awake ( )
inlinevirtual
virtual IEnumerator Expansions.Missions.ActionModule.Fire ( )
inlinevirtual
virtual string Expansions.Missions.ActionModule.GetAppObjectiveInfo ( )
inlinevirtual
string Expansions.Missions.ActionModule.GetDisplayName ( )
inline

Get the localized name of the node

Returns

Implements Expansions.Missions.IMENodeDisplay.

virtual string Expansions.Missions.ActionModule.GetInfo ( )
inlinevirtual
virtual List<IMENodeDisplay> Expansions.Missions.ActionModule.GetInternalParametersToDisplay ( )
inlinevirtual

Gets some more parameters to display.

Returns
Returns additional parameters that the module might want to display.

Implements Expansions.Missions.IMENodeDisplay.

Reimplemented in Expansions.Missions.Actions.ActionPartFailure, and Expansions.Missions.Actions.ActionMissionScore.

string Expansions.Missions.ActionModule.GetName ( )
inline

Get the name of the action module

Implements Expansions.Missions.IMENodeDisplay.

MENode Expansions.Missions.ActionModule.GetNode ( )
inline

Get the linked Mission node.

Returns
Associated MENode or null

Implements Expansions.Missions.IMENodeDisplay.

virtual string Expansions.Missions.ActionModule.GetNodeBodyParameterString ( BaseAPField  field)
inlinevirtual
bool Expansions.Missions.ActionModule.HasNodeBodyParameter ( string  parameter)
inline

Evaluates if the parameter is present in the node body display parameters

Parameters
parameter
Returns

Implements Expansions.Missions.IMENodeDisplay.

bool Expansions.Missions.ActionModule.HasSAPParameter ( string  parameter)
inline

Evaluates if the parameter is present in the SAP

Parameters
parameter
Returns

Implements Expansions.Missions.IMENodeDisplay.

virtual void Expansions.Missions.ActionModule.Initialize ( MENode  node)
inlinevirtual

This is called Once when an ActionModule component is instantiated. This is a mandatory Method and will set the MENode reference. Override this method in any action modules that require the MENode reference prior to Awake, but always call the base.Initialize

Parameters
node

Implements Expansions.Missions.IActionModule.

Reimplemented in Expansions.Missions.Actions.ActionPartFailure, Expansions.Missions.Actions.ActionDialogMessage, Expansions.Missions.Actions.ActionCreateKerbal, Expansions.Missions.Actions.ActionCreateVessel, Expansions.Missions.Actions.ActionMissionScore, Expansions.Missions.Actions.ActionCreateLaunchSite, and Expansions.Missions.Actions.ActionModifierScore.

virtual void Expansions.Missions.ActionModule.Load ( ConfigNode  node)
inlinevirtual
virtual void Expansions.Missions.ActionModule.OnCloned ( ref ActionModule  actionModuleBase)
inlinevirtual
virtual void Expansions.Missions.ActionModule.OnDestroy ( )
inlinevirtual
virtual void Expansions.Missions.ActionModule.OnPartPersistentIdChanged ( uint  vesselID,
uint  oldId,
uint  newId 
)
inlinevirtual

Override this function to catch when a parts persistentId is changed, you should use this to update any partID references in your action where the part is in the correct vessel

An example of this occuring is when a vessel is launched from a craft file if there is an existing vessel in the game

param name="vesselID">The persistentID of the vessel

Parameters
oldIdold Persistent ID
newIdnew Persistent ID

Reimplemented in Expansions.Missions.Actions.ActionPartResourceDrain, Expansions.Missions.Actions.ActionPartFailure, and Expansions.Missions.Actions.ActionPartExplode.

virtual void Expansions.Missions.ActionModule.OnVesselPersistentIdChanged ( uint  oldId,
uint  newId 
)
inlinevirtual

Override this function to catch when a vessels persistentId is changed, you should use this to update any vesselID references in your action

An example of this occuring is when a vessel is launched from a craft file if there is an existing vessel in the game

Parameters
oldIdold Persistent ID
newIdnew Persistent ID

Reimplemented in Expansions.Missions.Actions.ActionVessel, Expansions.Missions.Actions.ActionPartResourceDrain, Expansions.Missions.Actions.ActionPartFailure, and Expansions.Missions.Actions.ActionPartExplode.

virtual void Expansions.Missions.ActionModule.OnVesselsDocking ( uint  oldId,
uint  newId 
)
inlinevirtual

Override this function to catch when a Vessel Dock, you should use this to update any partID/Vessel references in your action where the part is in the correct vessel

An example of this occuring is when two vessels dock.

param name="oldId">The persistentId of the first Vessel

Parameters
newIdThe persistentId of the second Vessel

Reimplemented in Expansions.Missions.Actions.ActionVessel.

virtual void Expansions.Missions.ActionModule.OnVesselsUndocking ( Vessel  oldVessel,
Vessel  newVessel 
)
inlinevirtual

Override this function to catch when a parts Vessel is changed, you should use this to update any partID/Vessel references in your action where the part is in the correct vessel

An example of this occuring is when a vessel undocks and a new vessel is created.

param name="vessel">The Vessel that was created

Reimplemented in Expansions.Missions.Actions.ActionVessel, Expansions.Missions.Actions.ActionPartResourceDrain, Expansions.Missions.Actions.ActionPartFailure, and Expansions.Missions.Actions.ActionPartExplode.

virtual void Expansions.Missions.ActionModule.ParameterSetupComplete ( )
inlinevirtual

Can be used as a hook once all the parameters in a module have been setup.

Implements Expansions.Missions.IMENodeDisplay.

Reimplemented in Expansions.Missions.Actions.ActionDialogMessage.

void Expansions.Missions.ActionModule.RemoveParameterFromNodeBody ( string  parameter)
inline

Add a parameter to be displayed in the node body Used for batch processing node body parameters If you want an immediate UI update, use AddParameterToNodeBodyAndUpdateUI

Implements Expansions.Missions.IMENodeDisplay.

void Expansions.Missions.ActionModule.RemoveParameterFromNodeBodyAndUpdateUI ( string  parameter)
inline

Removes a parameter to be displayed in the node body Then updates the UI on the node body

Implements Expansions.Missions.IMENodeDisplay.

void Expansions.Missions.ActionModule.RemoveParameterFromSAP ( string  parameter)
inline

Remove a parameter to be displayed in the Settings Action Pane

Implements Expansions.Missions.IMENodeDisplay.

virtual void Expansions.Missions.ActionModule.RunValidation ( MissionEditorValidator  validator)
inlinevirtual
void Expansions.Missions.ActionModule.RunValidationWrapper ( MissionEditorValidator  validator)
inline

Called to run the Validation checks for this object.

User based stuff is in the overrides

Parameters
validatorThe MissionValidator that the results will be added to
virtual void Expansions.Missions.ActionModule.Save ( ConfigNode  node)
inlinevirtual
void Expansions.Missions.ActionModule.UpdateNodeBodyUI ( )
inline

Updates the node body parameters

Implements Expansions.Missions.IMENodeDisplay.

Member Data Documentation

bool Expansions.Missions.ActionModule.isRunning = false

Indicates if the coroutine is running. Set to true when Fire() method starts and set to false when it is finished. Used when restartOnSceneLoad is true to restart coroutine for an ActionModule.

MENode Expansions.Missions.ActionModule.node

Refernce to the Node that the action is part of

List<string> Expansions.Missions.ActionModule.parametersDisplayedInSAP

The parameters displayed in the Settings Action Pane

bool Expansions.Missions.ActionModule.restartOnSceneLoad = false

Set to true if this module requires the MissionSystem to restart a Fire() coroutine on scene change. It will only do this if the coroutine was already running before the scene change.

string Expansions.Missions.ActionModule.title = ""

The display name for this

Property Documentation

string Expansions.Missions.ActionModule.name
getset

the name of the module class


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