Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
Expansions.Missions.MENode Class Reference
Inheritance diagram for Expansions.Missions.MENode:
IConfigNode Expansions.Missions.Flow.IMEFlowBlock IDiscoverable

Public Member Functions

virtual void Activated ()
 Method to override for actions required when a node is activated More...
 
IActionModule AddAction (string actionName, ConfigNode cfg)
 Use reflection to add an action to the node. More...
 
void AddParametersDisplayedInNodeBody (List< DisplayParameter > parameters)
 Add a list of parameters to be displayed in the node body to the appropriate test and action modules More...
 
void AddParametersDisplayedInSAP (List< DisplayParameter > parameters)
 Add a list of parameters to be displayed in the Settings Action Pane to the appropriate test and action modules More...
 
void AddParameterToNodeBody (string module, 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...
 
virtual void Deactivated ()
 Method to override for actions required when a node is deactivated More...
 
List< T > GetAllActionModules< T > ()
 Retrieve a List of all the action modules of a certain type from the node. More...
 
Vector3 GetNodeLocationInWorld ()
 Get the Nodes location in world space. Which is only valid if the Node has a CreateVessel/Kerbal/Asteroid action module, or has a Test Module with an Orbit associated with it. More...
 
bool HasNodeBodyParameter (string module, string parameter)
 Evaluates if the parameter is present in the node body display parameters More...
 
bool HasTestOrbit (out Orbit testOrbit, out MissionOrbitRenderer testOrbitRenderer, bool drawOrbit=false)
 Checks if this node has a test Orbit associated in this test groups / test modules. More...
 
void Load (ConfigNode node)
 
void RemoveParameterFromNodeBody (string module, 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...
 
double RevealAltitude ()
 
string RevealDisplayName ()
 
float RevealMass ()
 
string RevealName ()
 
string RevealSituationString ()
 
double RevealSpeed ()
 
string RevealType ()
 
bool RunTests ()
 Run the TestGroups Test Method on the Current Node. More...
 
virtual void RunValidation (MissionEditorValidator validator)
 Override this to add custom Validation checks and results to this object More...
 
void Save (ConfigNode node)
 
void SetCatchAllNode (bool newCatchAll)
 Set the node to be a catch all node. More...
 
void UpdateMissionFlowUI (MEFlowParser parser)
 Method called by parser to trigger updates on the registered UI Elements associaated with this block More...
 

Static Public Member Functions

static MENode Clone (MENode nodeRef, Vector2 nodePos)
 Spawns a MENode gameobject and returns the cloned MENode The GameObject will have the passed in mission set as it's parent object. Set up the node using information from a the input node More...
 
static MENode Spawn (Mission mission)
 Spawns a MENode GameObject and returns the MENode component. The GameObject will have the passed in mission set as it's parent object. More...
 
static MENode Spawn (Mission mission, string title)
 Spawns a MENode GameObject and returns the MENode component. The GameObject will have the passed in mission set as it's parent object. More...
 
static MENode Spawn (Mission mission, MEBasicNode basicNode)
 Spawns a MENode GameObject and returns the MENode component. The GameObject will have the passed in mission set as it's parent object. Set up the node using information from a basic node More...
 

Public Attributes

List< IActionModuleactionModules
 list of action modules that are used on this node activating More...
 
double activatedUT
 UT time when the node was activated. More...
 
bool activateOnceOnly = true
 The display color for this node More...
 
string basicNodeSource = ""
 Name of the basic node that was used as a template to instantiate this node if its empty the node is either an advanced one or not made from a BasicNode More...
 
string description = ""
 Descriptive text for this node More...
 
int dockedIndex
 The index position of this node when docked More...
 
List< MENodedockedNodes
 These are the logic nodes that are docked to me. More...
 
List< Guid > dockedNodesIDsOnLoad
 These are the logic nodes that were docked to me when the mission was loaded. The information isn't maintained after load, so don't rely on it to be correct after that. More...
 
MENode dockParentNode
 This is the parent node we are docked to More...
 
Vector2 editorPosition
 
List< MENodefromNodes
 reference list of Nodes that can transition to this one More...
 
List< Color > fromNodesConnectionColor
 
MEGUINode guiNode
 Reference to the MEGUINode that the node contains the data for More...
 
bool hasMapObject = false
 True if a MapObject exists for this Node More...
 
bool isEndNode = false
 Indicates the node is an end node in the mission plan and will trigger the mission end sequence. More...
 
bool isEvent = false
 Indicates the node is an event node and will hide downstream items till this node activates. More...
 
bool isObjective = false
 Indicates the node is an objective node and will display for the player in run mode. More...
 
MapObject mapObject
 The MapObject for the Node if one is attached More...
 
string message = ""
 Indicates the message text to be shown in the End Mission Dialog. More...
 
Mission mission
 The mission this node belongs to. More...
 
MissionEndOptions missionEndOptions
 Indicates how the mission can be ended. More...
 
int msgTime = 5
 The time the screen message showing the node description will display for More...
 
List< DisplayParameternodeBodyParameters
 
Color nodeColor
 The display color for this node More...
 
OrbitDriver orbitDriver
 The OrbitDriver for the Node if one is attached More...
 
MissionOrbitRenderer orbitRenderer
 The MissionOrbitRenderer for the Node if one is attached More...
 
bool showScreenMessage = false
 If true will show the node description as a screen message for 5secs when the node activates More...
 
List< TestGrouptestGroups
 List of testgroups that are used to check if we should make this node active. More...
 
List< MENodetoNodes
 
bool UpdateInfoOnRefresh = false
 Set to true will refresh the information about this node in the Missions App whenever a Mission Refresh is requested of the MissionsApp. More...
 

Protected Member Functions

void SetNodeColor (Color nodeColor)
 

Properties

string category [get, set]
 Node category More...
 
int CountObjectives [get]
 
DiscoveryInfo DiscoveryInfo [get]
 
bool HasBeenActivated [get]
 Find out if the node has been activated yet. More...
 
bool HasObjectives [get]
 
bool HasPendingVesselLaunch [get]
 Does this node have a vessel launch pending More...
 
bool HasReachableObjectives [get]
 
bool HasTestModules [get]
 Does this node have any testmodules More...
 
bool HasVisibleChildren [get]
 
Guid id [get, set]
 Unique ID for this Node More...
 
bool IsActiveAndPendingVesselLaunch [get]
 Is this the active node and it has a pending vessel launch More...
 
bool IsActiveNode [get]
 Is this node the active one in the mission More...
 
bool IsDocked [get]
 Is this node docked to another node More...
 
bool IsHiddenByEvent [get]
 Is this node after an event node that has not yet been activated More...
 
bool IsLaunchPadNode [get]
 Indicates if this is a LaunchSite node - these can be docked to the Start Node Only More...
 
bool IsLogicNode [get]
 Indicates if this node is a logic node - these can be docked and generate branching paths More...
 
bool isNextObjective [get]
 Is this node a possible next objective - ie there is no objectives between this node and the active node More...
 
bool IsNodeLabelNode [get]
 Does this node have any test modules that implement the node label interface? More...
 
bool IsOrphanNode [get]
 Indicates if this node has no restrictions on the fromNode More...
 
bool IsReachable [get]
 Is this node reachable from the current activenode - i.e. is it on a branch that can be reached from the current location More...
 
bool IsScoringNode [get]
 Indicates if this is a scoring node - these can be docked to any node with a testmodule More...
 
bool IsVesselNode [get]
 Indicates if this node is a node that creates a vessel More...
 
string ObjectiveString [get]
 Return the objective string for this node More...
 
string Title [get, set]
 The display name for this More...
 
- Properties inherited from Expansions.Missions.Flow.IMEFlowBlock
int CountObjectives [get]
 
bool HasObjectives [get]
 
bool HasReachableObjectives [get]
 
bool HasVisibleChildren [get]
 
- Properties inherited from IDiscoverable
DiscoveryInfo DiscoveryInfo [get]
 

Member Function Documentation

virtual void Expansions.Missions.MENode.Activated ( )
inlinevirtual

Method to override for actions required when a node is activated

IActionModule Expansions.Missions.MENode.AddAction ( string  actionName,
ConfigNode  cfg 
)
inline

Use reflection to add an action to the node.

Parameters
actionNameThe name of the action to be added
cfgOptional config node to parse to fill in the parameters of the action
void Expansions.Missions.MENode.AddParametersDisplayedInNodeBody ( List< DisplayParameter parameters)
inline

Add a list of parameters to be displayed in the node body to the appropriate test and action modules

Parameters
parametersList of modules and their parameters to be displayed in the node body
void Expansions.Missions.MENode.AddParametersDisplayedInSAP ( List< DisplayParameter parameters)
inline

Add a list of parameters to be displayed in the Settings Action Pane to the appropriate test and action modules

Parameters
parametersList of modules and their parameters to be displayed in the Settings Action Pane
void Expansions.Missions.MENode.AddParameterToNodeBody ( string  module,
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

static MENode Expansions.Missions.MENode.Clone ( MENode  nodeRef,
Vector2  nodePos 
)
inlinestatic

Spawns a MENode gameobject and returns the cloned MENode The GameObject will have the passed in mission set as it's parent object. Set up the node using information from a the input node

Parameters
missionthe current mission on the mission editor
nodeRefthe node reference to be cloned or copied
Returns
virtual void Expansions.Missions.MENode.Deactivated ( )
inlinevirtual

Method to override for actions required when a node is deactivated

List<T> Expansions.Missions.MENode.GetAllActionModules< T > ( )
inline

Retrieve a List of all the action modules of a certain type from the node.

Returns
List of action modules of a certain type.
Type Constraints
T :ActionModule 
Vector3 Expansions.Missions.MENode.GetNodeLocationInWorld ( )
inline

Get the Nodes location in world space. Which is only valid if the Node has a CreateVessel/Kerbal/Asteroid action module, or has a Test Module with an Orbit associated with it.

Returns
A Vector3 location in world space if a valid location is available, otherwise will return Vector3.Zero
bool Expansions.Missions.MENode.HasNodeBodyParameter ( string  module,
string  parameter 
)
inline

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

Parameters
parameter
Returns
bool Expansions.Missions.MENode.HasTestOrbit ( out Orbit  testOrbit,
out MissionOrbitRenderer  testOrbitRenderer,
bool  drawOrbit = false 
)
inline

Checks if this node has a test Orbit associated in this test groups / test modules.

Parameters
drawOrbitSet to True to create a MissionOrbitRenderer, otherwise set to false.
testOrbitWill be set to the first test Orbit found. Or null if none are found.
testOrbitRendererWill be set to the MissionOrbitRenderer created if drawOrbit is set to true. Otherwise will be set to null.
Returns
True if the node actually has a location to display.
void Expansions.Missions.MENode.Load ( ConfigNode  node)
inline

Implements IConfigNode.

void Expansions.Missions.MENode.RemoveParameterFromNodeBody ( string  module,
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

double Expansions.Missions.MENode.RevealAltitude ( )
inline

Implements IDiscoverable.

string Expansions.Missions.MENode.RevealDisplayName ( )
inline

Implements IDiscoverable.

float Expansions.Missions.MENode.RevealMass ( )
inline

Implements IDiscoverable.

string Expansions.Missions.MENode.RevealName ( )
inline

Implements IDiscoverable.

string Expansions.Missions.MENode.RevealSituationString ( )
inline

Implements IDiscoverable.

double Expansions.Missions.MENode.RevealSpeed ( )
inline

Implements IDiscoverable.

string Expansions.Missions.MENode.RevealType ( )
inline

Implements IDiscoverable.

bool Expansions.Missions.MENode.RunTests ( )
inline

Run the TestGroups Test Method on the Current Node.

Returns
True if any Testgroup is true
virtual void Expansions.Missions.MENode.RunValidation ( MissionEditorValidator  validator)
inlinevirtual

Override this to add custom Validation checks and results to this object

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

Save connector colors

Implements IConfigNode.

void Expansions.Missions.MENode.SetCatchAllNode ( bool  newCatchAll)
inline

Set the node to be a catch all node.

Parameters
newCatchAllNew value of the catch all variable.
void Expansions.Missions.MENode.SetNodeColor ( Color  nodeColor)
inlineprotected
static MENode Expansions.Missions.MENode.Spawn ( Mission  mission)
inlinestatic

Spawns a MENode GameObject and returns the MENode component. The GameObject will have the passed in mission set as it's parent object.

Parameters
missionThe Mission this Node is within.
Returns
MENode component
static MENode Expansions.Missions.MENode.Spawn ( Mission  mission,
string  title 
)
inlinestatic

Spawns a MENode GameObject and returns the MENode component. The GameObject will have the passed in mission set as it's parent object.

Parameters
missionThe Mission this Node is within.
titleThe Title of the Node.
Returns
MENode component
static MENode Expansions.Missions.MENode.Spawn ( Mission  mission,
MEBasicNode  basicNode 
)
inlinestatic

Spawns a MENode GameObject and returns the MENode component. The GameObject will have the passed in mission set as it's parent object. Set up the node using information from a basic node

Parameters
missionThe Mission this Node is within.
basicNodeSource data
void Expansions.Missions.MENode.UpdateMissionFlowUI ( MEFlowParser  parser)
inline

Method called by parser to trigger updates on the registered UI Elements associaated with this block

Parameters
parserthe flowparser that created this block

Implements Expansions.Missions.Flow.IMEFlowBlock.

Member Data Documentation

List<IActionModule> Expansions.Missions.MENode.actionModules

list of action modules that are used on this node activating

double Expansions.Missions.MENode.activatedUT

UT time when the node was activated.

bool Expansions.Missions.MENode.activateOnceOnly = true

The display color for this node

string Expansions.Missions.MENode.basicNodeSource = ""

Name of the basic node that was used as a template to instantiate this node if its empty the node is either an advanced one or not made from a BasicNode

string Expansions.Missions.MENode.description = ""

Descriptive text for this node

int Expansions.Missions.MENode.dockedIndex

The index position of this node when docked

List<MENode> Expansions.Missions.MENode.dockedNodes

These are the logic nodes that are docked to me.

List<Guid> Expansions.Missions.MENode.dockedNodesIDsOnLoad

These are the logic nodes that were docked to me when the mission was loaded. The information isn't maintained after load, so don't rely on it to be correct after that.

MENode Expansions.Missions.MENode.dockParentNode

This is the parent node we are docked to

Vector2 Expansions.Missions.MENode.editorPosition
List<MENode> Expansions.Missions.MENode.fromNodes

reference list of Nodes that can transition to this one

List<Color> Expansions.Missions.MENode.fromNodesConnectionColor
MEGUINode Expansions.Missions.MENode.guiNode

Reference to the MEGUINode that the node contains the data for

bool Expansions.Missions.MENode.hasMapObject = false

True if a MapObject exists for this Node

bool Expansions.Missions.MENode.isEndNode = false

Indicates the node is an end node in the mission plan and will trigger the mission end sequence.

bool Expansions.Missions.MENode.isEvent = false

Indicates the node is an event node and will hide downstream items till this node activates.

bool Expansions.Missions.MENode.isObjective = false

Indicates the node is an objective node and will display for the player in run mode.

MapObject Expansions.Missions.MENode.mapObject

The MapObject for the Node if one is attached

string Expansions.Missions.MENode.message = ""

Indicates the message text to be shown in the End Mission Dialog.

Mission Expansions.Missions.MENode.mission

The mission this node belongs to.

MissionEndOptions Expansions.Missions.MENode.missionEndOptions

Indicates how the mission can be ended.

int Expansions.Missions.MENode.msgTime = 5

The time the screen message showing the node description will display for

List<DisplayParameter> Expansions.Missions.MENode.nodeBodyParameters
Color Expansions.Missions.MENode.nodeColor

The display color for this node

OrbitDriver Expansions.Missions.MENode.orbitDriver

The OrbitDriver for the Node if one is attached

MissionOrbitRenderer Expansions.Missions.MENode.orbitRenderer

The MissionOrbitRenderer for the Node if one is attached

bool Expansions.Missions.MENode.showScreenMessage = false

If true will show the node description as a screen message for 5secs when the node activates

List<TestGroup> Expansions.Missions.MENode.testGroups

List of testgroups that are used to check if we should make this node active.

List<MENode> Expansions.Missions.MENode.toNodes
bool Expansions.Missions.MENode.UpdateInfoOnRefresh = false

Set to true will refresh the information about this node in the Missions App whenever a Mission Refresh is requested of the MissionsApp.

Property Documentation

string Expansions.Missions.MENode.category
getset

Node category

int Expansions.Missions.MENode.CountObjectives
get
DiscoveryInfo Expansions.Missions.MENode.DiscoveryInfo
get
bool Expansions.Missions.MENode.HasBeenActivated
get

Find out if the node has been activated yet.

Returns
Returns true if the node has been activated, false if it hasn't been activated yet.
bool Expansions.Missions.MENode.HasObjectives
get
bool Expansions.Missions.MENode.HasPendingVesselLaunch
get

Does this node have a vessel launch pending

bool Expansions.Missions.MENode.HasReachableObjectives
get
bool Expansions.Missions.MENode.HasTestModules
get

Does this node have any testmodules

bool Expansions.Missions.MENode.HasVisibleChildren
get
Guid Expansions.Missions.MENode.id
getset

Unique ID for this Node

bool Expansions.Missions.MENode.IsActiveAndPendingVesselLaunch
get

Is this the active node and it has a pending vessel launch

bool Expansions.Missions.MENode.IsActiveNode
get

Is this node the active one in the mission

bool Expansions.Missions.MENode.IsDocked
get

Is this node docked to another node

bool Expansions.Missions.MENode.IsHiddenByEvent
get

Is this node after an event node that has not yet been activated

bool Expansions.Missions.MENode.IsLaunchPadNode
get

Indicates if this is a LaunchSite node - these can be docked to the Start Node Only

bool Expansions.Missions.MENode.IsLogicNode
get

Indicates if this node is a logic node - these can be docked and generate branching paths

bool Expansions.Missions.MENode.isNextObjective
get

Is this node a possible next objective - ie there is no objectives between this node and the active node

bool Expansions.Missions.MENode.IsNodeLabelNode
get

Does this node have any test modules that implement the node label interface?

bool Expansions.Missions.MENode.IsOrphanNode
get

Indicates if this node has no restrictions on the fromNode

bool Expansions.Missions.MENode.IsReachable
get

Is this node reachable from the current activenode - i.e. is it on a branch that can be reached from the current location

bool Expansions.Missions.MENode.IsScoringNode
get

Indicates if this is a scoring node - these can be docked to any node with a testmodule

bool Expansions.Missions.MENode.IsVesselNode
get

Indicates if this node is a node that creates a vessel

string Expansions.Missions.MENode.ObjectiveString
get

Return the objective string for this node

Returns
Returns the objective string for this node.
string Expansions.Missions.MENode.Title
getset

The display name for this


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