Kerbal Space Program
1.12.4
|
Static Public Member Functions | |
static bool | AllPartsFound (ConfigNode root, ref string error) |
Search through all the parts on a vessel to see if they exist More... | |
static void | AssembleForLaunch (ShipConstruct ship, string landedAt, string displaylandedAt, string flagURL, Game sceneState, VesselCrewManifest crewManifest) |
Public API static method for constructing a vessel from a shipconstruct. Adds it to FlightGlobals vessel list and sets it to the ActiveVessel. More... | |
static Vector3 | CalculateCraftSize (ShipConstruct ship) |
Calculate the bounds of a craft. More... | |
static Vector3 | CalculateCraftSize (List< Part > parts, Part rootPart) |
Calculate the bounds of a craft. More... | |
static Vector3 | CalculateCraftSize (ShipTemplate ship) |
Calculate the bounds of a craft. More... | |
static void | CaptureStockThumbnail (ShipConstruct ship, string craftPath, bool expansion) |
Used to capture Thumbnails for craft inside the Stock Ships or Expansion Folders More... | |
static void | CaptureThumbnail (ShipConstruct ship, string baseFolder, string thumbURL) |
Used to capture thumbnails for craft in saves/missions More... | |
static EditorFacility | CheckCraftFileType (string filePath) |
static bool | CheckLaunchSiteClear (FlightState flightState, string launchSiteName, bool doCleanup) |
static bool | CheckLaunchSiteClear (FlightState flightState, string launchSiteName, bool doCleanup, out int firstVesselOnPadIndex) |
static void | ClearBackups () |
static void | CreateBackup (ShipConstruct ship) |
static void | CreateConstructFromTemplate (ShipTemplate template, Callback< ShipConstruct > onComplete) |
static Texture2D | CreateSubassemblyIcon (ShipConstruct sa, int size) |
static void | DebugBackup () |
static Vector3 | FindCraftCenter (ShipConstruct ship) |
static Vector3 | FindCraftCenter (ShipConstruct ship, bool excludeClamps) |
Find the position of the center oof the Craft More... | |
static Vector3 | FindCraftMOI (Part rootPart, Vector3 CoM) |
static Vector3 | FindCraftMOI (Part part, Vector3 CoM, Vector3 MOI) |
static Part | findFirstControlSource (Vessel v) |
static Part | findFirstCrewablePart (Part part) |
static Part | findFirstPod_Placeholder (Part part) |
static Part | FindPartWithCraftID (uint craftID) |
static List< ProtoVessel > | FindVesselsAtLaunchSite (FlightState flightState, string launchSiteName) |
static List< ProtoVessel > | FindVesselsLandedAt (FlightState flightState, string landedAt) |
Returns a list of all vessels found to be landed at the given spot. More... | |
static void | FindVesselsLandedAt (FlightState flightState, string landedAt, out int count, out string name, out int idx, out VesselType vType) |
static string | GetCurrentGameShipsPathFor (EditorFacility facility) |
Returns the fully qualified file system path for the current game, down to the editor subfolder, e.g., "D:/games/KSP/saves/My Game/Ships/VAB/" More... | |
static float | GetPartCosts (ProtoPartSnapshot protoPart, AvailablePart aP, out float dryCost, out float fuelCost) |
Returns the value of a protopart, considering the value of resources in it. Does not account for recovery loss and Does not account for any crew inside the protopart. More... | |
static float | GetPartCosts (ProtoPartSnapshot protoPart, bool includeModuleCosts, AvailablePart aP, out float dryCost, out float fuelCost) |
Returns the value of a protopart, considering the value of resources in it. Does not account for recovery loss and Does not account for any crew inside the protopart, it checks if it should include module costs. More... | |
static float | GetPartCostsAndMass (ConfigNode partNode, AvailablePart aP, out float dryCost, out float fuelCost, out float dryMass, out float fuelMass) |
Returns the value of a part, considering the value of resources in it. Does not account for recovery loss and Does not account for any crew inside the protopart. More... | |
static string | GetPlayerCraftThumbnailName (string fullpath, string craftFileName) |
This returns the filename for a craft thumbnail. This is used when saving craft to generate the thumbnail filename, and when loading craft to determine the thumbnail filename to read. More... | |
static string | GetPlayerCraftThumbnailName (string gameName, string subDirectoryPath, string shipName) |
This returns the filename for a craft thumbnail. This is used when saving craft to generate the thumbnail filename, and when loading craft to determine the thumbnail filename to read. More... | |
static string | GetRootCraftSavePath () |
Returns the path to the ~/saves directory where the saved games are More... | |
static string | GetSavePath (string shipName) |
static string | GetShipsPathFor (string gameName, EditorFacility facility) |
Returns the fully qualified file system path for the provided game name (use HighLogic.GameName for the current game). E.g., "D:/games/KSP/saves/My game/Ships/VAB/" Omitting the second argument will provide the game's root directory. E.g., "D:/games/KSP/saves/My game/" More... | |
static string | GetShipsPathFor (string gameName) |
Returns the fully qualified file system path for the provided game name (use HighLogic.SaveFolder for the current game). E.g., "D:/games/KSP/saves/My game/Ships/VAB/" Omitting the second argument will provide the game's root directory. E.g., "D:/games/KSP/saves/My game/" More... | |
static string | GetShipsSubfolderFor (EditorFacility facility) |
Returns the editor subfolder for the provided facility. E.g., "VAB" or "SPH" Does not return a full path. More... | |
static Texture2D | GetThumbnail (string thumbURL) |
static uint | GetUniqueFlightID (FlightState flightState) |
static bool | IsCompatible (ConfigNode root, ref string error) |
Check to see if a craft has the correct version to be loaded by this copy of KSP More... | |
static ShipConstruct | LoadShip (string filePath) |
static ShipConstruct | LoadShip () |
static ShipConstruct | LoadSubassembly (string shipFilename) |
static ShipTemplate | LoadTemplate (string shipFilename) |
static void | PutShipToGround (ShipConstruct ship, Transform spawnPoint) |
static void | RecoverVesselFromFlight (ProtoVessel vessel, FlightState fromState) |
Recover a vessel from flight, returning its crew to available state. More... | |
static void | RecoverVesselFromFlight (ProtoVessel vessel, FlightState fromState, bool quick) |
Recover a vessel from flight, returning its crew to available state. More... | |
static ShipConstruct | RestoreBackup (int index) |
static void | SanitizeCraftIDs (List< Part > parts, bool preserveIDsOnGivenParts) |
static void | SanitizePartCosts (AvailablePart aP, ConfigNode partNode) |
make sure the cost of the part isn't less than the sum of the cost of its resources More... | |
static string | SaveShip (ShipConstruct ship, string shipFilename) |
static string | SaveShip (string shipFilename) |
static string | SaveShipToPath (string shipName, string path) |
Saves the craft with the provided name, in the provided location. More... | |
static string | SaveShipToPath (string gameFolder, EditorFacility editorFacility, string localPath, string shipName) |
Saves the craft in the provided game directory, under the provided facility, in the provided path, with the provided name. More... | |
static string | SaveSubassembly (ShipConstruct ship, string shipFilename) |
static void | ShiftAndCreateBackup (ShipConstruct ship) |
static bool | SubassemblyExists (string shipFilename) |
Static Public Attributes | |
static List< ConfigNode > | backups = new List<ConfigNode>() |
static ConfigNode | ShipConfig |
static VesselCrewManifest | ShipManifest |
static EditorFacility | ShipType |
|
inlinestatic |
Search through all the parts on a vessel to see if they exist
root | Config node containing the details of the ship |
error | Returns a string containing a list of all the errors |
|
inlinestatic |
Public API static method for constructing a vessel from a shipconstruct. Adds it to FlightGlobals vessel list and sets it to the ActiveVessel.
ship | the ShipConstruct |
landedAt | string for where the vessel is landed - in English |
displaylandedAt | string for where the vessel is landed - Localized |
flagURL | the flag URL for the vessel |
sceneState | the Game we are adding the vessel to |
crewManifest | the vessels crew manfest |
|
inlinestatic |
Calculate the bounds of a craft.
ship | Ship to calculate the bounds for |
|
inlinestatic |
Calculate the bounds of a craft.
parts | List of all the parts in the craft |
rootPart | Root part of the craft |
|
inlinestatic |
Calculate the bounds of a craft.
ship | Ship to calculate the bounds for |
|
inlinestatic |
Used to capture Thumbnails for craft inside the Stock Ships or Expansion Folders
ship | The ship |
craftPath | Full path of the ship/file |
expansion | True if its an expansion ship |
|
inlinestatic |
Used to capture thumbnails for craft in saves/missions
ship | |
baseFolder | |
thumbURL |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Find the position of the center oof the Craft
ship | Ship |
excludeClamps | True to not include LaunchClamps in the calculation |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Returns a list of all vessels found to be landed at the given spot.
|
inlinestatic |
|
inlinestatic |
Returns the fully qualified file system path for the current game, down to the editor subfolder, e.g., "D:/games/KSP/saves/My Game/Ships/VAB/"
|
inlinestatic |
Returns the value of a protopart, considering the value of resources in it. Does not account for recovery loss and Does not account for any crew inside the protopart.
protoPart | The protoPart |
aP | The PartInfo |
dryCost | Cost of the part without resources |
fuelCost | Cost of the Resources |
|
inlinestatic |
Returns the value of a protopart, considering the value of resources in it. Does not account for recovery loss and Does not account for any crew inside the protopart, it checks if it should include module costs.
protoPart | The protoPart |
includeModuleCosts | Should the calculation include the module cost variables |
aP | The PartInfo |
dryCost | Cost of the part without resources |
fuelCost | Cost of the Resources |
|
inlinestatic |
Returns the value of a part, considering the value of resources in it. Does not account for recovery loss and Does not account for any crew inside the protopart.
partNode | |
aP | |
dryCost | |
fuelCost | |
dryMass | |
fuelMass |
|
inlinestatic |
This returns the filename for a craft thumbnail. This is used when saving craft to generate the thumbnail filename, and when loading craft to determine the thumbnail filename to read.
Thumbnail naming pattern: {game name}_{editor type}_{sanitized path}_{shipname}.png Where {sanitized path} is the sub-directory path. Diretory separators are replaced with underscore (_). Path starts with the first directory under the editor directory. For example, Using this path: D: first game stage rockets packages Using this ship name: Science Mission 1 Produces this thumbnail name: "my first game_VAB_one stage rockets_science packages_Science Mission 1.png"
fullpath | The fully qualified path to the file. Does not include filename. |
craftFileName | The name of the craft. Does not include file exension. |
|
inlinestatic |
This returns the filename for a craft thumbnail. This is used when saving craft to generate the thumbnail filename, and when loading craft to determine the thumbnail filename to read.
Thumbnail naming pattern: {game name}_{editor type}_{sanitized path}_{shipname}.png Where {sanitized path} is the sub-directory path. Diretory separators are replaced with underscore (_). Path starts with the first directory under the editor directory. For example, Using this path: D: first game stage rockets packages Using this ship name: Science Mission 1 Produces this thumbnail name: "my first game_VAB_one stage rockets_science packages_Science Mission 1.png"
gameName | the folder name of the game directory, e.g., "my game" |
subDirectoryPath | the user-created directory tree (starting with the editor) where the craft resides, e.g., "/VAB/rockets/single stage" |
shipName | the craft name, e.g., "Saturn 5" |
|
inlinestatic |
Returns the path to the ~/saves directory where the saved games are
|
inlinestatic |
|
inlinestatic |
Returns the fully qualified file system path for the provided game name (use HighLogic.GameName for the current game). E.g., "D:/games/KSP/saves/My game/Ships/VAB/" Omitting the second argument will provide the game's root directory. E.g., "D:/games/KSP/saves/My game/"
|
inlinestatic |
Returns the fully qualified file system path for the provided game name (use HighLogic.SaveFolder for the current game). E.g., "D:/games/KSP/saves/My game/Ships/VAB/" Omitting the second argument will provide the game's root directory. E.g., "D:/games/KSP/saves/My game/"
|
inlinestatic |
Returns the editor subfolder for the provided facility. E.g., "VAB" or "SPH" Does not return a full path.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Check to see if a craft has the correct version to be loaded by this copy of KSP
root | Config node containing the details of the ship |
error | Returns a string containing a list of all the errors |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Recover a vessel from flight, returning its crew to available state.
vessel | The vessel to recover |
fromState | The flightstate |
|
inlinestatic |
Recover a vessel from flight, returning its crew to available state.
vessel | The vessel to recover |
fromState | The flightstate |
quick | If true, recovery dialog is skipped. |
|
inlinestatic |
|
inlinestatic |
< make sure all craft IDs are unique
|
inlinestatic |
make sure the cost of the part isn't less than the sum of the cost of its resources
aP | |
partNode |
|
inlinestatic |
< save craft picture in /thumbs
|
inlinestatic |
< save craft picture in /thumbs
|
inlinestatic |
Saves the craft with the provided name, in the provided location.
|
inlinestatic |
Saves the craft in the provided game directory, under the provided facility, in the provided path, with the provided name.
gameFolder | the name of the game-save folder, e.g., "my game" |
editorFacility | the editor that was used to create the craft, e.g., VAB or SPH |
localPath | the player-created subfolders, e.g., "rockets/single stage" |
shipName | the craft name, e.g., "Saturn 5" |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |