Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Static Public Member Functions | Static Public Attributes | Properties | List of all members
Expansions.Missions.MissionsUtils Class Reference

Classes

class  Objectives
 

Static Public Member Functions

static void AddMissionsScenarios ()
 Will add all Scenarios that have ScenarioCreationOptions.AddToNewMissionGames to the scene. Be careful, depending on the scene some may already be running. Should ONLY be used if you know they aren't. More...
 
static List< MissionPackGatherMissionPacks (MissionTypes missionType)
 Get the mission packs for the supplied type More...
 
static string GetBaseMissionsPath (string missionName)
 Get the full path of a base game mission to be loaded that was made by Squad. More...
 
static int GetFacilityLimit (string facilityName, int defaultLevel)
 Get the configured MaxLevel for a facilty from the difficulty params More...
 
static String GetFieldValueForDisplay (BaseAPField field)
 Helper method to get the display string for a fields value More...
 
static string GetMissionsFolder (MissionTypes missionType)
 Get the path to the Missions folder based on the type of mission More...
 
static string GetStockMissionsPath (string missionName)
 Get the full path of a mission to be loaded that was made by Squad. More...
 
static Texture2D GetTextureInExternalPath (string filePath)
 
static string GetUsersMissionsPath (string missionName)
 Get the full path of a mission to be saved. More...
 
static void InitialiseAdjusterTypes ()
 Creates a dictionary to link all of the adjuster types and the part modules that they support. More...
 
static MEFlowParser InstantiateMEFlowParser (Transform parent)
 Instantiates an Instance of MEFlowParser and sets it's parent Transform More...
 
static GameObject MEPrefab (string prefabPath)
 Returns the GameObject Prefab More...
 
static Texture2D METexture (string prefabPath)
 Returns a Texture2D from the Asset Bundle. More...
 
static void OpenMissionBuilder ()
 Helper method to open the MissionBuilder scene from the bundles More...
 
static void RebuildPacksList ()
 Empty the list and rebuild the packs from the GameDB and MissionPacks.cfg inside Users Mission folders More...
 
static void RemoveMissionSaves (string folderName)
 Removes any saves/missions and saves/test_missions folder for the folder name (mission name) passed in. More...
 
static string VerifyUsersMissionsFolder (string missionName)
 Verifies and creates the save folder and sub parts for a mission. More...
 

Static Public Attributes

static DictionaryValueList
< string, List< Type > > 
adjusterTypesSupportedByPartModule = new DictionaryValueList<string, List<Type>>()
 Dictionary connecting all the part modules with the part module adjusters that they support. More...
 
static readonly string fileExtension = ".mission"
 The extension we use for missions More...
 
static DictionaryValueList
< string, List< Type > > 
partModuleTypesSupportedByAdjuster = new DictionaryValueList<string, List<Type>>()
 Dictionary connecting all the part module adjusters with the part modules that they can affect. More...
 

Properties

static string BaseMissionsPath [get]
 Path to where the Squad provided Base Game Stock .mission files are More...
 
static string ExpansionRootPath [get]
 The folder that is the root of stock files for the Missions Expansion More...
 
static string MissionExportsPath [get]
 Path to where the compressed mission files are exported More...
 
static string MissionImportCompletedPath [get]
 Path to where the compressed mission files are stored once they've been imported More...
 
static DictionaryValueList
< string, MissionPack
MissionPacks [get]
 The list of mission packs loaded from cfg files More...
 
static string SavesPath [get]
 Path to the sub folder that the mission saves are stored More...
 
static string SavesRootPath [get]
 Path to the folder that the mission saves are stored More...
 
static string StockMissionsPath [get]
 Path to where the Squad provided .mission files are More...
 
static string TemplatesPath [get]
 Path to where the Squad provided Template mission files are More...
 
static string UsersMissionsPath [get]
 Path to where the Users .mission files are More...
 

Member Function Documentation

static void Expansions.Missions.MissionsUtils.AddMissionsScenarios ( )
inlinestatic

Will add all Scenarios that have ScenarioCreationOptions.AddToNewMissionGames to the scene. Be careful, depending on the scene some may already be running. Should ONLY be used if you know they aren't.

static List<MissionPack> Expansions.Missions.MissionsUtils.GatherMissionPacks ( MissionTypes  missionType)
inlinestatic

Get the mission packs for the supplied type

Parameters
missionType
Returns
static string Expansions.Missions.MissionsUtils.GetBaseMissionsPath ( string  missionName)
inlinestatic

Get the full path of a base game mission to be loaded that was made by Squad.

Parameters
missionNameName of the mission.
Returns
Full path of a mission to be loaded that was made by Squad.
static int Expansions.Missions.MissionsUtils.GetFacilityLimit ( string  facilityName,
int  defaultLevel 
)
inlinestatic

Get the configured MaxLevel for a facilty from the difficulty params

Parameters
facilityNameThe string name of the facility
defaultLevelwhat to return if we dont have a setting
Returns
static String Expansions.Missions.MissionsUtils.GetFieldValueForDisplay ( BaseAPField  field)
inlinestatic

Helper method to get the display string for a fields value

Parameters
fieldThe field
Returns
string of display text
static string Expansions.Missions.MissionsUtils.GetMissionsFolder ( MissionTypes  missionType)
inlinestatic

Get the path to the Missions folder based on the type of mission

Parameters
missionTypeStock or User
Returns
Full path to folder
static string Expansions.Missions.MissionsUtils.GetStockMissionsPath ( string  missionName)
inlinestatic

Get the full path of a mission to be loaded that was made by Squad.

Parameters
missionNameName of the mission.
Returns
Full path of a mission to be loaded that was made by Squad.
static Texture2D Expansions.Missions.MissionsUtils.GetTextureInExternalPath ( string  filePath)
inlinestatic
static string Expansions.Missions.MissionsUtils.GetUsersMissionsPath ( string  missionName)
inlinestatic

Get the full path of a mission to be saved.

Parameters
missionNameName of the mission (which will also become the file name).
Returns
Full path of a mission to be saved.
static void Expansions.Missions.MissionsUtils.InitialiseAdjusterTypes ( )
inlinestatic

Creates a dictionary to link all of the adjuster types and the part modules that they support.

static MEFlowParser Expansions.Missions.MissionsUtils.InstantiateMEFlowParser ( Transform  parent)
inlinestatic

Instantiates an Instance of MEFlowParser and sets it's parent Transform

Parameters
parentThe PArent Transform to attach the instance to
Returns
The MEFlowParser instance
static GameObject Expansions.Missions.MissionsUtils.MEPrefab ( string  prefabPath)
inlinestatic

Returns the GameObject Prefab

Parameters
prefabPathThe prefab path; also include the file suffix
Returns
static Texture2D Expansions.Missions.MissionsUtils.METexture ( string  prefabPath)
inlinestatic

Returns a Texture2D from the Asset Bundle.

Parameters
prefabPathThe prefab path; also include the file suffix
Returns
static void Expansions.Missions.MissionsUtils.OpenMissionBuilder ( )
inlinestatic

Helper method to open the MissionBuilder scene from the bundles

static void Expansions.Missions.MissionsUtils.RebuildPacksList ( )
inlinestatic

Empty the list and rebuild the packs from the GameDB and MissionPacks.cfg inside Users Mission folders

static void Expansions.Missions.MissionsUtils.RemoveMissionSaves ( string  folderName)
inlinestatic

Removes any saves/missions and saves/test_missions folder for the folder name (mission name) passed in.

Parameters
folderName
static string Expansions.Missions.MissionsUtils.VerifyUsersMissionsFolder ( string  missionName)
inlinestatic

Verifies and creates the save folder and sub parts for a mission.

Parameters
missionNameThe title of the mission - it will be sanitized in here
Returns
Path to the missions directory

Member Data Documentation

DictionaryValueList<string, List<Type> > Expansions.Missions.MissionsUtils.adjusterTypesSupportedByPartModule = new DictionaryValueList<string, List<Type>>()
static

Dictionary connecting all the part modules with the part module adjusters that they support.

readonly string Expansions.Missions.MissionsUtils.fileExtension = ".mission"
static

The extension we use for missions

DictionaryValueList<string, List<Type> > Expansions.Missions.MissionsUtils.partModuleTypesSupportedByAdjuster = new DictionaryValueList<string, List<Type>>()
static

Dictionary connecting all the part module adjusters with the part modules that they can affect.

Property Documentation

string Expansions.Missions.MissionsUtils.BaseMissionsPath
staticget

Path to where the Squad provided Base Game Stock .mission files are

KSP/GameData/Squad/Missions usually

string Expansions.Missions.MissionsUtils.ExpansionRootPath
staticget

The folder that is the root of stock files for the Missions Expansion

KSP/GameData/SquadExpansion/MakingHistory usually

string Expansions.Missions.MissionsUtils.MissionExportsPath
staticget

Path to where the compressed mission files are exported

KSP/Missions/_Exports usually

string Expansions.Missions.MissionsUtils.MissionImportCompletedPath
staticget

Path to where the compressed mission files are stored once they've been imported

KSP/Missions/_Imported usually

DictionaryValueList<string, MissionPack> Expansions.Missions.MissionsUtils.MissionPacks
staticget

The list of mission packs loaded from cfg files

either the gameDB files or MissionPacks.cfg inside Users Mission folders

string Expansions.Missions.MissionsUtils.SavesPath
staticget

Path to the sub folder that the mission saves are stored

missions/ usually if not in test mode test_missions/ usually if in test mode

Parameters
testModeSpecifies if this missions needs to save in test mode
Returns
string Expansions.Missions.MissionsUtils.SavesRootPath
staticget

Path to the folder that the mission saves are stored

KSP/saves/missions usually if not in test mode KSP/saves/test_missions usually if in test mode

Parameters
testModeSpecifies if this missions needs to save in test mode
Returns
string Expansions.Missions.MissionsUtils.StockMissionsPath
staticget

Path to where the Squad provided .mission files are

KSP/GameData/SquadExpansion/MakingHistory/Missions usually

string Expansions.Missions.MissionsUtils.TemplatesPath
staticget

Path to where the Squad provided Template mission files are

KSP/GameData/SquadExpansion/MakingHistory/Templates usually

string Expansions.Missions.MissionsUtils.UsersMissionsPath
staticget

Path to where the Users .mission files are

KSP/Missions usually


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