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 | Properties | List of all members
KSP.UI.Screens.CraftProfileInfo Class Reference

This class holds the details that are displayed for each craft file in the CraftBrowserDialog More...

Inheritance diagram for KSP.UI.Screens.CraftProfileInfo:
IConfigNode

Public Member Functions

bool CraftHasErrors ()
 Returns True or False if the craft file has errors. More...
 
 CraftProfileInfo ()
 
string GetErrorMessage ()
 Get a string describing all of the problems that there are with the vessel. More...
 
void Load (ConfigNode node)
 load the object from a provided confignode More...
 
CraftProfileInfo LoadDetailsFromCraftFile (ConfigNode root, string filePath)
 This method loads the details needed for the dialog from a craft file More...
 
void LoadFromMetaFile (string loadmetaPath)
 Load the object from a persisted .loadmeta file (alongside the craft file) More...
 
void Save (ConfigNode node)
 Save the values to the config node More...
 
void SaveToMetaFile (string loadmetaPath)
 Save the object to a .loadmeta file alongside the craft file More...
 

Static Public Member Functions

static long GetLastWriteTime (string fullPath)
 Get the last write time of the sfs file with this name More...
 
static string GetSFSMD5 (string fullPath)
 Calculate the MD5 hash of the craft file More...
 
static void PrepareCraftMetaFileLoad ()
 Call this to prepare some data for loading the loadmeta files Only needs to be called once before loading all of the files for one of the dialogues More...
 

Public Attributes

List< string > BrokenShipParts = new List<String>()
 
VersionCompareResult compatibility = VersionCompareResult.INVALID
 Is this craft file compatible with this version of KSP? More...
 
string description = string.Empty
 Description of the ship More...
 
bool duplicatedParts = false
 Duplicated parts means that the craft file is broken More...
 
long lastWriteTime
 Last write time of the save file (in ticks) More...
 
int partCount = 0
 Number of parts in the ship More...
 
List< string > partModules = null
 List of the part modules used in the parts in the ship More...
 
List< string > partNames = null
 List of the parts used to create the ship More...
 
string saveMD5 = ""
 Storage for MD5 hash of the SFS file More...
 
EditorFacility shipFacility
 Facility used to create the ship More...
 
string shipName = string.Empty
 Name of the ship More...
 
bool shipPartsExperimental = false
 Are any of the parts used in the ship experimental? More...
 
Vector3 shipSize = Vector3.zero
 Size of the ship More...
 
int stageCount = 0
 Number of stages in the ship More...
 
ulong steamPublishedFileId = 0
 This is the steam published FileId for this craft if it has been published to Steam. More...
 
float totalCost = 0.0f
 Total cost of the ship More...
 
float totalMass = 0.0f
 Total mass of the ship More...
 
List< string > UnavailableShipPartModules = new List<string>()
 List of all the locked ship part modules More...
 
List< string > UnavailableShipParts = new List<string>()
 List of all the locked ship parts More...
 
string version = string.Empty
 Version of KSP used to create this craft file. More...
 

Properties

bool shipPartModulesAvailable [get]
 Can all of the part modules of the ship be used? More...
 
bool shipPartsUnlocked [get]
 Can all of the parts of the ship be used? More...
 

Detailed Description

This class holds the details that are displayed for each craft file in the CraftBrowserDialog

Constructor & Destructor Documentation

KSP.UI.Screens.CraftProfileInfo.CraftProfileInfo ( )
inline

Member Function Documentation

bool KSP.UI.Screens.CraftProfileInfo.CraftHasErrors ( )
inline

Returns True or False if the craft file has errors.

Returns
string KSP.UI.Screens.CraftProfileInfo.GetErrorMessage ( )
inline

Get a string describing all of the problems that there are with the vessel.

Returns
String describing all of the problems that there are with the vessel
static long KSP.UI.Screens.CraftProfileInfo.GetLastWriteTime ( string  fullPath)
inlinestatic

Get the last write time of the sfs file with this name

Parameters
filenamename of the save file (without extension)
saveFoldername of the save folder
Returns
The last write time (in ticks)
static string KSP.UI.Screens.CraftProfileInfo.GetSFSMD5 ( string  fullPath)
inlinestatic

Calculate the MD5 hash of the craft file

Parameters
fullPathname of the craft file
Returns
The MD5 hash
void KSP.UI.Screens.CraftProfileInfo.Load ( ConfigNode  node)
inline

load the object from a provided confignode

Parameters
node

Implements IConfigNode.

CraftProfileInfo KSP.UI.Screens.CraftProfileInfo.LoadDetailsFromCraftFile ( ConfigNode  root,
string  filePath 
)
inline

This method loads the details needed for the dialog from a craft file

Parameters
rootConfig node from the craft file
filePathPath to the craft file
Returns
CraftProfileInfo for the craft file
void KSP.UI.Screens.CraftProfileInfo.LoadFromMetaFile ( string  loadmetaPath)
inline

Load the object from a persisted .loadmeta file (alongside the craft file)

Parameters
loadmetaPathfull path of the loadmeta file
static void KSP.UI.Screens.CraftProfileInfo.PrepareCraftMetaFileLoad ( )
inlinestatic

Call this to prepare some data for loading the loadmeta files Only needs to be called once before loading all of the files for one of the dialogues

void KSP.UI.Screens.CraftProfileInfo.Save ( ConfigNode  node)
inline

Save the values to the config node

Parameters
node

Implements IConfigNode.

void KSP.UI.Screens.CraftProfileInfo.SaveToMetaFile ( string  loadmetaPath)
inline

Save the object to a .loadmeta file alongside the craft file

Parameters
loadmetaPathPath of the loadmeta file

Member Data Documentation

List<string> KSP.UI.Screens.CraftProfileInfo.BrokenShipParts = new List<String>()
VersionCompareResult KSP.UI.Screens.CraftProfileInfo.compatibility = VersionCompareResult.INVALID

Is this craft file compatible with this version of KSP?

string KSP.UI.Screens.CraftProfileInfo.description = string.Empty

Description of the ship

bool KSP.UI.Screens.CraftProfileInfo.duplicatedParts = false

Duplicated parts means that the craft file is broken

long KSP.UI.Screens.CraftProfileInfo.lastWriteTime

Last write time of the save file (in ticks)

int KSP.UI.Screens.CraftProfileInfo.partCount = 0

Number of parts in the ship

List<string> KSP.UI.Screens.CraftProfileInfo.partModules = null

List of the part modules used in the parts in the ship

List<string> KSP.UI.Screens.CraftProfileInfo.partNames = null

List of the parts used to create the ship

string KSP.UI.Screens.CraftProfileInfo.saveMD5 = ""

Storage for MD5 hash of the SFS file

EditorFacility KSP.UI.Screens.CraftProfileInfo.shipFacility

Facility used to create the ship

string KSP.UI.Screens.CraftProfileInfo.shipName = string.Empty

Name of the ship

bool KSP.UI.Screens.CraftProfileInfo.shipPartsExperimental = false

Are any of the parts used in the ship experimental?

Vector3 KSP.UI.Screens.CraftProfileInfo.shipSize = Vector3.zero

Size of the ship

int KSP.UI.Screens.CraftProfileInfo.stageCount = 0

Number of stages in the ship

ulong KSP.UI.Screens.CraftProfileInfo.steamPublishedFileId = 0

This is the steam published FileId for this craft if it has been published to Steam.

float KSP.UI.Screens.CraftProfileInfo.totalCost = 0.0f

Total cost of the ship

float KSP.UI.Screens.CraftProfileInfo.totalMass = 0.0f

Total mass of the ship

List<string> KSP.UI.Screens.CraftProfileInfo.UnavailableShipPartModules = new List<string>()

List of all the locked ship part modules

List<string> KSP.UI.Screens.CraftProfileInfo.UnavailableShipParts = new List<string>()

List of all the locked ship parts

string KSP.UI.Screens.CraftProfileInfo.version = string.Empty

Version of KSP used to create this craft file.

Property Documentation

bool KSP.UI.Screens.CraftProfileInfo.shipPartModulesAvailable
get

Can all of the part modules of the ship be used?

bool KSP.UI.Screens.CraftProfileInfo.shipPartsUnlocked
get

Can all of the parts of the ship be used?


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