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

Static Public Member Functions

static bool BiomeIsUnlisted (CelestialBody body, string biome)
 Searches for a Biome that matches the passed in biome name field on the passed in CelestialBody. Will return True if the biome is NOT found. Will return False if the biome IS found. More...
 
static string GenerateLocalizedTitle (string id)
 Generates Localized title string by reverse engineering the ID field. If this fails it will return empty string. More...
 
static string GenerateScienceSubjectTitle (ScienceExperiment exp, ExperimentSituations sit, CelestialBody body, string biome="", string displaybiome="")
 Generates ScienceSubject Title string (localized) More...
 
static string GenerateScienceSubjectTitle (ScienceExperiment exp, ExperimentSituations sit, string sourceUid, string sourceTitle, CelestialBody body, string biome="", string displaybiome="")
 Generates ScienceSubject Title string (localized) More...
 
static IScienceDataTransmitter GetBestTransmitter (List< IScienceDataTransmitter > vesselTransmitters)
 
static IScienceDataTransmitter GetBestTransmitter (Vessel v)
 
static string GetBiomedisplayName (CelestialBody body, string biome)
 Will return the Biome displayName (Localized) or if not found return the string passed in More...
 
static string GetBiomedisplayName (CelestialBody body, string biome, bool formatted)
 Will return the Biome displayName (Localized) or if not found return the string passed in More...
 
static string GetExperimentBiome (CelestialBody body, double lat, double lon)
 Returns the Biome for a given body and GPS location - English More...
 
static string GetExperimentBiomeLocalized (CelestialBody body, double lat, double lon)
 Returns the Biome for a given body and GPS location - Localized

Parameters
body
lat
lon
Returns
localized biome string
More...
 
static string GetExperimentBodyName (string subjectID)
 Returns the bodyName from a sciencedata ID string. Where format is: experiment More...
 
static void GetExperimentFieldsFromScienceID (string subjectID, out string BodyName, out ExperimentSituations Situation, out string Biome)
 Splits out the componets of a Science Subject ID (experiment) and returns the celestialbody Name, situation and biome. More...
 
static void GetExperimentFieldsFromScienceID (string subjectID, out string BodyName, out string Situation, out string Biome)
 Splits out the componets of a Science Subject ID (experiment) and returns the celestialbody Name, situation and biome. More...
 
static ExperimentSituations GetExperimentSituation (Vessel v)
 
static float GetLabScore (ModuleScienceLab lab)
 
static float GetTransmitterScore (IScienceDataTransmitter t)
 
static bool RequiredUsageExternalAvailable (Vessel v, Vessel vExt, ExperimentUsageReqs req, ScienceExperiment exp, ref string message)
 
static bool RequiredUsageInternalAvailable (Vessel v, Part p, ExperimentUsageReqs req, ScienceExperiment exp, ref string message)
 

Member Function Documentation

static bool ScienceUtil.BiomeIsUnlisted ( CelestialBody  body,
string  biome 
)
inlinestatic

Searches for a Biome that matches the passed in biome name field on the passed in CelestialBody. Will return True if the biome is NOT found. Will return False if the biome IS found.

Parameters
bodyThe CelestialBody
biomeThe biome name as a string (English key)
Returns
Will return True if the biome is NOT found. Will return False if the biome IS found.
static string ScienceUtil.GenerateLocalizedTitle ( string  id)
inlinestatic

Generates Localized title string by reverse engineering the ID field. If this fails it will return empty string.

Returns
localized title string
static string ScienceUtil.GenerateScienceSubjectTitle ( ScienceExperiment  exp,
ExperimentSituations  sit,
CelestialBody  body,
string  biome = "",
string  displaybiome = "" 
)
inlinestatic

Generates ScienceSubject Title string (localized)

Parameters
exp
sit
body
biomeMust be English Biome name
displaybiomeShould be Localized Biome name
Returns
static string ScienceUtil.GenerateScienceSubjectTitle ( ScienceExperiment  exp,
ExperimentSituations  sit,
string  sourceUid,
string  sourceTitle,
CelestialBody  body,
string  biome = "",
string  displaybiome = "" 
)
inlinestatic

Generates ScienceSubject Title string (localized)

Parameters
exp
sit
sourceUid
sourceTitle
body
biomeMust be English Biome name
displaybiomeShould be Localized Biome name
Returns
static IScienceDataTransmitter ScienceUtil.GetBestTransmitter ( List< IScienceDataTransmitter vesselTransmitters)
inlinestatic
static IScienceDataTransmitter ScienceUtil.GetBestTransmitter ( Vessel  v)
inlinestatic
static string ScienceUtil.GetBiomedisplayName ( CelestialBody  body,
string  biome 
)
inlinestatic

Will return the Biome displayName (Localized) or if not found return the string passed in

Parameters
bodyThe CelestialBody
biomeThe biome name as a string (English key)
Returns
static string ScienceUtil.GetBiomedisplayName ( CelestialBody  body,
string  biome,
bool  formatted 
)
inlinestatic

Will return the Biome displayName (Localized) or if not found return the string passed in

Parameters
bodyThe CelestialBody
biomeThe biome name as a string (English key)
formattedIf true will return the Localized string. If false will return the Localization #autoLOC tag.
Returns
static string ScienceUtil.GetExperimentBiome ( CelestialBody  body,
double  lat,
double  lon 
)
inlinestatic

Returns the Biome for a given body and GPS location - English

Parameters
body
lat
lon
Returns
biome string - always in English
static string ScienceUtil.GetExperimentBiomeLocalized ( CelestialBody  body,
double  lat,
double  lon 
)
inlinestatic

Returns the Biome for a given body and GPS location - Localized

Parameters
body
lat
lon
Returns
localized biome string

static string ScienceUtil.GetExperimentBodyName ( string  subjectID)
inlinestatic

Returns the bodyName from a sciencedata ID string. Where format is: experiment

Parameters
subjectIDsciencedata ID
Returns
bodyName or empty string
static void ScienceUtil.GetExperimentFieldsFromScienceID ( string  subjectID,
out string  BodyName,
out ExperimentSituations  Situation,
out string  Biome 
)
inlinestatic

Splits out the componets of a Science Subject ID (experiment) and returns the celestialbody Name, situation and biome.

Parameters
subjectIDInput science subject ID in format (experiment)
BodyNamereturns the CelestialBody Name string or empty string
Situationreturns the Sitiation as Enum ExperimentSituations or default
Biomereturns the biome name string (English key) or empty string
static void ScienceUtil.GetExperimentFieldsFromScienceID ( string  subjectID,
out string  BodyName,
out string  Situation,
out string  Biome 
)
inlinestatic

Splits out the componets of a Science Subject ID (experiment) and returns the celestialbody Name, situation and biome.

Parameters
subjectIDInput science subject ID in format (experiment)
BodyNamereturns the CelestialBody Name string or empty string
Situationreturns the Sitiation as a string or empty string
Biomereturns the biome name string (English key) or empty string
static ExperimentSituations ScienceUtil.GetExperimentSituation ( Vessel  v)
inlinestatic
static float ScienceUtil.GetLabScore ( ModuleScienceLab  lab)
inlinestatic
static float ScienceUtil.GetTransmitterScore ( IScienceDataTransmitter  t)
inlinestatic
static bool ScienceUtil.RequiredUsageExternalAvailable ( Vessel  v,
Vessel  vExt,
ExperimentUsageReqs  req,
ScienceExperiment  exp,
ref string  message 
)
inlinestatic
static bool ScienceUtil.RequiredUsageInternalAvailable ( Vessel  v,
Part  p,
ExperimentUsageReqs  req,
ScienceExperiment  exp,
ref string  message 
)
inlinestatic

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