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 | Properties | List of all members
Expansions.Missions.MissionSituation Class Reference
Inheritance diagram for Expansions.Missions.MissionSituation:
IConfigNode Expansions.Missions.IMENodeDisplay

Public Types

enum  StartTypeEnum {
  StartTypeEnum.VAB, StartTypeEnum.SPH, StartTypeEnum.VesselList, StartTypeEnum.SpaceCenter,
  StartTypeEnum.SaveFile
}
 Possible options for a missions start scene/situation More...
 
enum  VesselStartSituations { VesselStartSituations.LANDED = 1, VesselStartSituations.PRELAUNCH = 4, VesselStartSituations.ORBITING = 32 }
 Supported vessel start situations for missions. Should translate directly to Vessel.Situation Enum entries. More...
 

Public Member Functions

bool AddNodeWithVesselToBuild (MENode node)
 Adds a MENode to the nodesWithVesselToBuild list for Vessel Creation nodes. Checks if the passed in node is atually part of this mission. The list will be processed once the player goes to the VAB/SPH to begin building vessels. Will only add the node for processing if the current game is a Mission in Play. 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...
 
void Destroy ()
 Perform all the cleaning operations that we need before the module is destroyed. More...
 
void DestroySituation ()
 
void FillVesselSituationList (MENode missionStartNode, bool replaceIfFound=false, bool fillAllNodes=false)
 Fills the starting vesselList with the docked CreateVessel nodes attached to the startNode. Will check first if an entry with matching persistentId already is in the list and will NOT replace it by default. More...
 
List< VesselSituationGetAvailableVesselSituations ()
 Get the list off available vessel situtations More...
 
string GetDisplayName ()
 Get the name of the module More...
 
string GetInfo ()
 Get the information to be displayed about the module in the tooltip. More...
 
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...
 
VesselSituation GetVesselSituationByVesselID (uint PersistentId)
 Searches the VesselSituationList for an entry that matches the passed in vessel persistentId. 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...
 
void Initialize ()
 Perform all the setup operations that we need when the module is initialised in the mission builder. More...
 
void InitSituation ()
 Initialize the situation and actions of the mission More...
 
void Load (ConfigNode node)
 
 MissionSituation ()
 
 MissionSituation (Mission mission)
 
void ParameterSetupComplete ()
 Can be used as a hook once all the parameters in a module have been setup and/or displayed in the SAP. More...
 
void RemoveLaunchedVessels ()
 Removes all entries from the VesselSituationList that have been Launched. 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 Save (ConfigNode node)
 
void UpdateNodeBodyUI ()
 Updates the node body parameters More...
 
void UpdateVesselBuildValues ()
 This will update the number of vessels that have been built in this editor session and will set the current one to the next in line. More...
 
bool VesselSituationLaunched (VesselSituation situation)
 Sets the Vessel in the passed in VesselSituation to Launched in the Mission Node it is part of. Use RemoveLaunchedVessels() to remove all Launched vessels from the VesselSituationList. More...
 
bool VesselSituationListContains (uint persistentId)
 Searches the VesselSituationList for an entry that matches the passed in vessel persistentId. More...
 
bool VesselSituationReadyToLaunch (VesselSituation situation)
 Sets the Vessel in the passed in VesselSituation to readyToLaunch in the Mission Node it is part of. More...
 
bool VesselSituationRevertLaunch (VesselSituation situation)
 Sets the Vessel in the passed in VesselSituation to not readyToLaunch in the Mission Node it is part of. More...
 

Public Attributes

bool autoGenerateCrew = false
 Specifies if the mission should autogenerate a crew list for the vessels or not, if not you need to specify a crew list More...
 
KerbalRoster crewRoster
 Mission start Crew Roster, this is used when the autoGeneratedCrew value is set to false. More...
 
GameParameters gameParameters
 The difficulty parameters for the mission game when its started More...
 
Mission mission
 The Mission this Situation belongs to. More...
 
MissionInstructor missionInstructor
 The Instructor that will appear in the dialog More...
 
string missionRoster = ""
 Button to open Mission Roster More...
 
List< string > parametersDisplayedInSAP
 The parameters displayed in the Settings Action Pane More...
 
MissionPartFilter partFilter
 Part filter applied mission wide to all vessels More...
 
int resourceSeed
 
int rocMissionSeed
 
bool showBriefing
 
StartTypeEnum startType = StartTypeEnum.VesselList
 The scene/situation the mission will start in More...
 
double startUT
 Start time for the mission. More...
 
uint startVesselID = 0u
 The starting situation of the vessel. More...
 

Properties

VesselSituation CurrentVesselToBuild [get]
 Returns the VesselSituation of the current vessel selected/being built in the VAB/SPH or null More...
 
uint CurrentVesselToBuildId [get]
 The current vesselSituation being Built/Selected More...
 
int NumberofVesselsPending [get]
 Returns the number of player built vessels that are pending build. IE Have not had the Launch button pressed in the VAB/SPH and have not been spawned into the flight scene. More...
 
EditorFacility startFacility [get]
 
List< IActionModuleStartingActions [get]
 
GameScenes startScene [get]
 What GameScene the situation translates to. More...
 
bool VesselsArePending [get]
 Returns true if there are any vessels that have to be built. More...
 
int VesselsBuilt [get]
 The number of vessels that have been built from the list and had the Launch Button pressed in the VAB/SPH More...
 
DictionaryValueList
< VesselSituation, Guid > 
VesselSituationList [get]
 

Member Enumeration Documentation

Possible options for a missions start scene/situation

Enumerator
VAB 
SPH 
VesselList 
SpaceCenter 
SaveFile 

Supported vessel start situations for missions. Should translate directly to Vessel.Situation Enum entries.

Enumerator
LANDED 
PRELAUNCH 
ORBITING 

Constructor & Destructor Documentation

Expansions.Missions.MissionSituation.MissionSituation ( )
inline
Expansions.Missions.MissionSituation.MissionSituation ( Mission  mission)
inline

Member Function Documentation

bool Expansions.Missions.MissionSituation.AddNodeWithVesselToBuild ( MENode  node)
inline

Adds a MENode to the nodesWithVesselToBuild list for Vessel Creation nodes. Checks if the passed in node is atually part of this mission. The list will be processed once the player goes to the VAB/SPH to begin building vessels. Will only add the node for processing if the current game is a Mission in Play.

Parameters
nodeThe node with an ActionCreateVessel attached to it.
void Expansions.Missions.MissionSituation.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.MissionSituation.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.MissionSituation.AddParameterToSAP ( string  parameter)
inline

Add a parameter to be displayed in the Settings Action Pane

Implements Expansions.Missions.IMENodeDisplay.

void Expansions.Missions.MissionSituation.Destroy ( )
inline

Perform all the cleaning operations that we need before the module is destroyed.

void Expansions.Missions.MissionSituation.DestroySituation ( )
inline
void Expansions.Missions.MissionSituation.FillVesselSituationList ( MENode  missionStartNode,
bool  replaceIfFound = false,
bool  fillAllNodes = false 
)
inline

Fills the starting vesselList with the docked CreateVessel nodes attached to the startNode. Will check first if an entry with matching persistentId already is in the list and will NOT replace it by default.

Parameters
missionStartNodeThe Node that will be searched for docked vesselnodes to add to the list
replaceIfFoundSet to true will force existing entries to be replaced
fillAllNodesWill fill the lists with ALL nodes if true, and if true - will create placeholder craft files for all player created vessels in the mission; otherwise will only fill the lists with the nodes docked to the start node (Default)
List<VesselSituation> Expansions.Missions.MissionSituation.GetAvailableVesselSituations ( )
inline

Get the list off available vessel situtations

Returns
string Expansions.Missions.MissionSituation.GetDisplayName ( )
inline

Get the name of the module

Implements Expansions.Missions.IMENodeDisplay.

string Expansions.Missions.MissionSituation.GetInfo ( )
inline

Get the information to be displayed about the module in the tooltip.

Returns
Information to be displayed about the module in the tooltip

Implements Expansions.Missions.IMENodeDisplay.

List<IMENodeDisplay> Expansions.Missions.MissionSituation.GetInternalParametersToDisplay ( )
inline

Gets some more parameters to display.

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

Implements Expansions.Missions.IMENodeDisplay.

string Expansions.Missions.MissionSituation.GetName ( )
inline

Get the name of the action module

Implements Expansions.Missions.IMENodeDisplay.

MENode Expansions.Missions.MissionSituation.GetNode ( )
inline

Get the linked Mission node.

Returns
Associated MENode or null

Implements Expansions.Missions.IMENodeDisplay.

virtual string Expansions.Missions.MissionSituation.GetNodeBodyParameterString ( BaseAPField  field)
inlinevirtual

Returns the string to be displayed when the parameter is displayed in the node body

Parameters
field
Returns

Implements Expansions.Missions.IMENodeDisplay.

VesselSituation Expansions.Missions.MissionSituation.GetVesselSituationByVesselID ( uint  PersistentId)
inline

Searches the VesselSituationList for an entry that matches the passed in vessel persistentId.

Parameters
PersistentIdvessel PersistentId
Returns
Matching VesselSituation or null
bool Expansions.Missions.MissionSituation.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.MissionSituation.HasSAPParameter ( string  parameter)
inline

Evaluates if the parameter is present in the SAP

Parameters
parameter
Returns

Implements Expansions.Missions.IMENodeDisplay.

void Expansions.Missions.MissionSituation.Initialize ( )
inline

Perform all the setup operations that we need when the module is initialised in the mission builder.

void Expansions.Missions.MissionSituation.InitSituation ( )
inline

Initialize the situation and actions of the mission

void Expansions.Missions.MissionSituation.Load ( ConfigNode  node)
inline

Implements IConfigNode.

void Expansions.Missions.MissionSituation.ParameterSetupComplete ( )
inline

Can be used as a hook once all the parameters in a module have been setup and/or displayed in the SAP.

Implements Expansions.Missions.IMENodeDisplay.

void Expansions.Missions.MissionSituation.RemoveLaunchedVessels ( )
inline

Removes all entries from the VesselSituationList that have been Launched.

void Expansions.Missions.MissionSituation.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.MissionSituation.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.MissionSituation.RemoveParameterFromSAP ( string  parameter)
inline

Remove a parameter to be displayed in the Settings Action Pane

Implements Expansions.Missions.IMENodeDisplay.

virtual void Expansions.Missions.MissionSituation.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.MissionSituation.Save ( ConfigNode  node)
inline

Implements IConfigNode.

void Expansions.Missions.MissionSituation.UpdateNodeBodyUI ( )
inline

Updates the node body parameters

Implements Expansions.Missions.IMENodeDisplay.

void Expansions.Missions.MissionSituation.UpdateVesselBuildValues ( )
inline

This will update the number of vessels that have been built in this editor session and will set the current one to the next in line.

bool Expansions.Missions.MissionSituation.VesselSituationLaunched ( VesselSituation  situation)
inline

Sets the Vessel in the passed in VesselSituation to Launched in the Mission Node it is part of. Use RemoveLaunchedVessels() to remove all Launched vessels from the VesselSituationList.

Parameters
situationThe VesselSituation for the vessel to set to ready to launched.
Returns
True if successful otherwise returns false.
bool Expansions.Missions.MissionSituation.VesselSituationListContains ( uint  persistentId)
inline

Searches the VesselSituationList for an entry that matches the passed in vessel persistentId.

Parameters
persistentIdvessel PersistentId
Returns
Returns True if VesselSituationList contains the persistentId passed in OR False
bool Expansions.Missions.MissionSituation.VesselSituationReadyToLaunch ( VesselSituation  situation)
inline

Sets the Vessel in the passed in VesselSituation to readyToLaunch in the Mission Node it is part of.

Parameters
situationThe VesselSituation for the vessel to set to ready to launch.
Returns
True if successful otherwise returns false.
bool Expansions.Missions.MissionSituation.VesselSituationRevertLaunch ( VesselSituation  situation)
inline

Sets the Vessel in the passed in VesselSituation to not readyToLaunch in the Mission Node it is part of.

Parameters
situationThe VesselSituation for the vessel to set to not ready to launch.
Returns
True if successful otherwise returns false.

Member Data Documentation

bool Expansions.Missions.MissionSituation.autoGenerateCrew = false

Specifies if the mission should autogenerate a crew list for the vessels or not, if not you need to specify a crew list

KerbalRoster Expansions.Missions.MissionSituation.crewRoster

Mission start Crew Roster, this is used when the autoGeneratedCrew value is set to false.

GameParameters Expansions.Missions.MissionSituation.gameParameters

The difficulty parameters for the mission game when its started

Mission Expansions.Missions.MissionSituation.mission

The Mission this Situation belongs to.

MissionInstructor Expansions.Missions.MissionSituation.missionInstructor

The Instructor that will appear in the dialog

string Expansions.Missions.MissionSituation.missionRoster = ""

Button to open Mission Roster

List<string> Expansions.Missions.MissionSituation.parametersDisplayedInSAP

The parameters displayed in the Settings Action Pane

MissionPartFilter Expansions.Missions.MissionSituation.partFilter

Part filter applied mission wide to all vessels

int Expansions.Missions.MissionSituation.resourceSeed
int Expansions.Missions.MissionSituation.rocMissionSeed
bool Expansions.Missions.MissionSituation.showBriefing
StartTypeEnum Expansions.Missions.MissionSituation.startType = StartTypeEnum.VesselList

The scene/situation the mission will start in

double Expansions.Missions.MissionSituation.startUT

Start time for the mission.

uint Expansions.Missions.MissionSituation.startVesselID = 0u

The starting situation of the vessel.

Property Documentation

VesselSituation Expansions.Missions.MissionSituation.CurrentVesselToBuild
get

Returns the VesselSituation of the current vessel selected/being built in the VAB/SPH or null

uint Expansions.Missions.MissionSituation.CurrentVesselToBuildId
get

The current vesselSituation being Built/Selected

int Expansions.Missions.MissionSituation.NumberofVesselsPending
get

Returns the number of player built vessels that are pending build. IE Have not had the Launch button pressed in the VAB/SPH and have not been spawned into the flight scene.

EditorFacility Expansions.Missions.MissionSituation.startFacility
get
List<IActionModule> Expansions.Missions.MissionSituation.StartingActions
get
GameScenes Expansions.Missions.MissionSituation.startScene
get

What GameScene the situation translates to.

bool Expansions.Missions.MissionSituation.VesselsArePending
get

Returns true if there are any vessels that have to be built.

Returns
int Expansions.Missions.MissionSituation.VesselsBuilt
get

The number of vessels that have been built from the list and had the Launch Button pressed in the VAB/SPH

DictionaryValueList<VesselSituation, Guid> Expansions.Missions.MissionSituation.VesselSituationList
get

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