Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
FlightDriver Class Reference
Inheritance diagram for FlightDriver:

Public Types

enum  StartupBehaviours { StartupBehaviours.NEW_FROM_FILE, StartupBehaviours.RESUME_SAVED_FILE, StartupBehaviours.RESUME_SAVED_CACHE, StartupBehaviours.NEW_FROM_CRAFT_NODE }
 

Public Member Functions

void FocusTargetVessel ()
 

Static Public Member Functions

static Game RemoveSavedVessel (Game original, int vesselIndex)
 Removes a vessel from a save state. Returns a clone of the original state, only with the given vessel removed and its crew made available again. Mind it doesn't save the new state and doesn't remove the vessel from the scene. This modifies the state only. More...
 
static void ReturnToEditor (EditorFacility facility)
 Swallow your pride and return to the editors with all losses saved. More...
 
static void RevertToLaunch ()
 
static void RevertToPrelaunch (EditorFacility facility)
 Be a cheater and rewind time to edit the ship as if nothing had gone wrong. More...
 
static void SetPause (bool pauseState, bool postScreenMessage=true)
 Pauses the event feed for flight mode. More...
 
static void StartAndFocusVessel (string stateFileToLoad, int vesselToFocusIdx)
 
static void StartAndFocusVessel (Game stateToLoad, int vesselToFocusIdx)
 
static void StartWithNewLaunch (string fullFilePath, string missionFlagURL, string launchSiteName, VesselCrewManifest manifest)
 

Public Attributes

bool bypassLoadingEnforce
 
bool bypassPersistence
 
bool DEBUG_PauseAfterStart
 
int framesBeforeInitialSave = 15
 
StartupBehaviours inEditorStartUpMode
 
int targetVessel = 0
 
string uiSkinName = "KSP window 1"
 

Static Public Attributes

static bool CanRevertToPostInit
 Indicates whether flight start conditions allow reverting to the post-init state, generated right after flight start. Will be true if flight started focusing on a vessel in pre-launch state. More...
 
static bool CanRevertToPrelaunch
 Indicates whether flight start conditions allow reverting to before the vessel was launched. Will be true if flight started with a new vessel launch, both from VAB/SPH or from Launch Facilities. Implies there is a valid ship cached in ShipConstruct.ShipConfig. More...
 
static FlightDriver fetch
 
static bool flightStarted
 
static Game FlightStateCache
 
static int FocusVesselAfterLoad
 
static string LaunchSiteName = "LaunchPad"
 
static string newShipFlagURL = ""
 
static VesselCrewManifest newShipManifest
 
static string newShipToLoadPath = ""
 
static GameBackup PostInitState
 The flight state captured right after flight start. Don't null-check this to determine whether reverting is possible. Use CanRevertToLaunch instead. More...
 
static GameBackup PreLaunchState
 
static StartupBehaviours StartupBehaviour = StartupBehaviours.NEW_FROM_FILE
 
static string StateFileToLoad = "persistent"
 

Properties

static bool BypassPersistence [get]
 
static bool CanRevert [get]
 True if its possible to revert to the initial state or prelaunch state More...
 
static bool Pause [get]
 The current pause state of the game (read-only) More...
 

Member Enumeration Documentation

Enumerator
NEW_FROM_FILE 
RESUME_SAVED_FILE 
RESUME_SAVED_CACHE 
NEW_FROM_CRAFT_NODE 

Member Function Documentation

void FlightDriver.FocusTargetVessel ( )
inline
static Game FlightDriver.RemoveSavedVessel ( Game  original,
int  vesselIndex 
)
inlinestatic

Removes a vessel from a save state. Returns a clone of the original state, only with the given vessel removed and its crew made available again. Mind it doesn't save the new state and doesn't remove the vessel from the scene. This modifies the state only.

Parameters
originalThe original game state to modify
vesselIndexThe index for the vessel to remove
Returns
The modified game state
static void FlightDriver.ReturnToEditor ( EditorFacility  facility)
inlinestatic

Swallow your pride and return to the editors with all losses saved.

Parameters
sceneToLoad
static void FlightDriver.RevertToLaunch ( )
inlinestatic
static void FlightDriver.RevertToPrelaunch ( EditorFacility  facility)
inlinestatic

Be a cheater and rewind time to edit the ship as if nothing had gone wrong.

Parameters
sceneToLoad

< overwrite persistent flight state with the one stored before launch

static void FlightDriver.SetPause ( bool  pauseState,
bool  postScreenMessage = true 
)
inlinestatic

Pauses the event feed for flight mode.

Parameters
pauseStatetrue to pause, false to resume
static void FlightDriver.StartAndFocusVessel ( string  stateFileToLoad,
int  vesselToFocusIdx 
)
inlinestatic
static void FlightDriver.StartAndFocusVessel ( Game  stateToLoad,
int  vesselToFocusIdx 
)
inlinestatic
static void FlightDriver.StartWithNewLaunch ( string  fullFilePath,
string  missionFlagURL,
string  launchSiteName,
VesselCrewManifest  manifest 
)
inlinestatic

Member Data Documentation

bool FlightDriver.bypassLoadingEnforce
bool FlightDriver.bypassPersistence
bool FlightDriver.CanRevertToPostInit
static

Indicates whether flight start conditions allow reverting to the post-init state, generated right after flight start. Will be true if flight started focusing on a vessel in pre-launch state.

bool FlightDriver.CanRevertToPrelaunch
static

Indicates whether flight start conditions allow reverting to before the vessel was launched. Will be true if flight started with a new vessel launch, both from VAB/SPH or from Launch Facilities. Implies there is a valid ship cached in ShipConstruct.ShipConfig.

bool FlightDriver.DEBUG_PauseAfterStart
FlightDriver FlightDriver.fetch
static
bool FlightDriver.flightStarted
static
Game FlightDriver.FlightStateCache
static
int FlightDriver.FocusVesselAfterLoad
static
int FlightDriver.framesBeforeInitialSave = 15
StartupBehaviours FlightDriver.inEditorStartUpMode
string FlightDriver.LaunchSiteName = "LaunchPad"
static
string FlightDriver.newShipFlagURL = ""
static
VesselCrewManifest FlightDriver.newShipManifest
static
string FlightDriver.newShipToLoadPath = ""
static
GameBackup FlightDriver.PostInitState
static

The flight state captured right after flight start. Don't null-check this to determine whether reverting is possible. Use CanRevertToLaunch instead.

GameBackup FlightDriver.PreLaunchState
static
StartupBehaviours FlightDriver.StartupBehaviour = StartupBehaviours.NEW_FROM_FILE
static
string FlightDriver.StateFileToLoad = "persistent"
static
int FlightDriver.targetVessel = 0
string FlightDriver.uiSkinName = "KSP window 1"

Property Documentation

bool FlightDriver.BypassPersistence
staticget
bool FlightDriver.CanRevert
staticget

True if its possible to revert to the initial state or prelaunch state

bool FlightDriver.Pause
staticget

The current pause state of the game (read-only)


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