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
FinePrint.Utilities.ProgressUtilities Class Reference

Static Public Member Functions

static float AverageFacilityLevel ()
 Average facility level. More...
 
static Dictionary
< CelestialBody, int > 
CelestialCrewCounts (List< Vessel.Situations > situations)
 Attempts to get a list of kerbals, where they are, and what they are doing. More...
 
static double CurrentTrackRecord (RecordTrackType type)
 Gets the current track record of a given record type. More...
 
static bool ExperimentPossibleAt (string experimentID, CelestialBody body, double latitude, double longitude, double altitude, double terrainHeight)
 Determines whether a science experiment is possible to deploy at an arbitrary location. More...
 
static double FindNextRecord (double currentRecord, double maximumRecord, double roundValue)
 Used in record track progress nodes to interpolate from small records to larger ones. More...
 
static double FindNextRecord (double currentRecord, double maximumRecord, double roundValue, ref int interval)
 Used in record track progress nodes to interpolate from small records to larger ones. More...
 
static bool GetAnyBodyProgress (CelestialBody body, MannedStatus manned=MannedStatus.ANY)
 Efficiently checks for any manned/unmanned progression on a specific body. More...
 
static List< CelestialBodyGetBodiesProgress (ProgressType type, bool bodyReached, bool progressComplete, MannedStatus manned, Func< CelestialBody, bool > where=null, List< CelestialBody > bodies=null)
 Gathers a list of bodies that the player has done or not done something at. More...
 
static List< CelestialBodyGetBodiesProgress (ProgressType type, bool bodyReached, bool progressComplete, Func< CelestialBody, bool > where=null, List< CelestialBody > bodies=null)
 Gathers a list of bodies that the player has done or not done something at. More...
 
static List< CelestialBodyGetBodiesProgress (ProgressType type, bool progressComplete, MannedStatus manned, Func< CelestialBody, bool > where=null, List< CelestialBody > bodies=null)
 Gathers a list of bodies that the player has done or not done something at. More...
 
static List< CelestialBodyGetBodiesProgress (ProgressType type, bool progressComplete, Func< CelestialBody, bool > where=null, List< CelestialBody > bodies=null)
 Gathers a list of bodies that the player has done or not done something at. More...
 
static List< CelestialBodyGetBodiesProgress (bool bodyReached, MannedStatus manned, Func< CelestialBody, bool > where=null, List< CelestialBody > bodies=null)
 Gathers a list of bodies that the player has done any manned or unmanned progression at. More...
 
static List< CelestialBodyGetBodiesProgress (bool bodyReached, Func< CelestialBody, bool > where=null, List< CelestialBody > bodies=null)
 Gathers a list of bodies that the player has done any manned or unmanned progression at. More...
 
static bool GetBodyProgress (ProgressType progress, CelestialBody body, MannedStatus manned=MannedStatus.ANY)
 Determines if the player has done something on a particular celestial body. More...
 
static List< CelestialBodyGetNextUnreached (int count, MannedStatus manned, Func< CelestialBody, bool > where=null)
 Gets the next few bodies with an unreached manned status. More...
 
static List< CelestialBodyGetNextUnreached (int count, Func< CelestialBody, bool > where=null)
 Gets the next few bodies with an unreached manned status. More...
 
static int GetProgressLevel ()
 An integral representation of the player's progress in the game. More...
 
static bool HaveAnyTech (IList< string > partNames, IList< string > moduleNames, bool logging=true)
 Helper function that determines if any assorted part or module names are unlocked in the tech tree. More...
 
static bool HaveModuleTech (string moduleName, string excludeModule=null)
 Determines if the player has researched any parts containing a particular module. More...
 
static bool HavePartTech (string partName, bool logging=true)
 Determines if the player has researched a particular part technology. More...
 
static bool IntroWorldFirstContract (ProgressMilestone milestone)
 Checks to see if a progress milestone is part of the initial lineup of World Firsts leaving Kerbin. More...
 
static bool OutlierWorldFirstContract (ProgressType type, CelestialBody body)
 Checks to see if a progress milestone is part of the outlier contracts reserved for end game. More...
 
static bool OutlierWorldFirstContract (ProgressMilestone milestone)
 Checks to see if a progress milestone is part of the outlier contracts reserved for end game. More...
 
static Contract.ContractPrestige ProgressTypePrestige (ProgressType type, CelestialBody body=null)
 Assigns an arbitrary contract prestige to each progress type. Useful for post processing. More...
 
static Contract.ContractPrestige ProgressTypePrestige (ProgressMilestone milestone)
 Assigns an arbitrary contract prestige to each progress type. Useful for post processing. More...
 
static bool ReachedHomeBodies ()
 Checks if the player has visited all of the bodies in his home system. More...
 
static float ScoreProgressType (ProgressType type, CelestialBody body)
 Provides a score multiplier for a progress type much like a vessel situation. More...
 
static bool VisitedSurfaceOf (CelestialBody body, MannedStatus manned=MannedStatus.ANY)
 Determines whether the player has been on the surface of a planet. Automatically passes on homeworld. More...
 
static float WorldFirstIntervalReward (ProgressRewardType reward, Currency currency, ProgressType progress, CelestialBody body=null, int currentInterval=1, int totalIntervals=10)
 Assigns rewards to World First progress nodes and contracts that are split up at an interval. More...
 
static float WorldFirstStandardReward (ProgressRewardType reward, Currency currency, ProgressType progress, CelestialBody body=null)
 Assigns standard rewards to World First progress nodes and contracts. More...
 

Member Function Documentation

static float FinePrint.Utilities.ProgressUtilities.AverageFacilityLevel ( )
inlinestatic

Average facility level.

Returns
The average level of all facilities.
static Dictionary<CelestialBody,int> FinePrint.Utilities.ProgressUtilities.CelestialCrewCounts ( List< Vessel.Situations situations)
inlinestatic

Attempts to get a list of kerbals, where they are, and what they are doing.

Parameters
situationsThe situations to match.
Returns
A dictionary of celestialbody crew counts.
static double FinePrint.Utilities.ProgressUtilities.CurrentTrackRecord ( RecordTrackType  type)
inlinestatic

Gets the current track record of a given record type.

Parameters
typeThe type of record track.
Returns
The current record on that track.
static bool FinePrint.Utilities.ProgressUtilities.ExperimentPossibleAt ( string  experimentID,
CelestialBody  body,
double  latitude,
double  longitude,
double  altitude,
double  terrainHeight 
)
inlinestatic

Determines whether a science experiment is possible to deploy at an arbitrary location.

Parameters
experimentIDThe experiment ID.
bodyThe celestial body.
latitudeThe latitude.
longitudeThe longitude.
altitudeThe altitude.
terrainHeightThe terrain height.
Returns
If the experiment is possible there.
static double FinePrint.Utilities.ProgressUtilities.FindNextRecord ( double  currentRecord,
double  maximumRecord,
double  roundValue 
)
inlinestatic

Used in record track progress nodes to interpolate from small records to larger ones.

Parameters
currentRecordThe current record.
maximumRecordThe maximum desired record.
roundValueWhat to round the record limits to.
Returns
The next record to break.
static double FinePrint.Utilities.ProgressUtilities.FindNextRecord ( double  currentRecord,
double  maximumRecord,
double  roundValue,
ref int  interval 
)
inlinestatic

Used in record track progress nodes to interpolate from small records to larger ones.

Parameters
currentRecordThe current record.
maximumRecordThe maximum desired record.
roundValueWhat to round the record limits to.
intervalAn integer to store the chosen interval in, for rewards.
Returns
The next record to break.
static bool FinePrint.Utilities.ProgressUtilities.GetAnyBodyProgress ( CelestialBody  body,
MannedStatus  manned = MannedStatus.ANY 
)
inlinestatic

Efficiently checks for any manned/unmanned progression on a specific body.

Parameters
bodyThe body.
mannedThe manned status.
Returns
If there has been any progress of that type on that body.

< We're looking for body progress, so we want to filter out things that aren't in celestial body subtrees.

< We filter crew sensitive if checking manned or unmanned, as non crew sensitive nodes will return true for these either way when complete.

static List<CelestialBody> FinePrint.Utilities.ProgressUtilities.GetBodiesProgress ( ProgressType  type,
bool  bodyReached,
bool  progressComplete,
MannedStatus  manned,
Func< CelestialBody, bool >  where = null,
List< CelestialBody bodies = null 
)
inlinestatic

Gathers a list of bodies that the player has done or not done something at.

Parameters
typeWhat the player did or did not do.
bodyReachedIf the body has any manned or unmanned progress at all.
progressCompleteIf the progress type was completed or not.
mannedWhether he did it manned or unmanned.
whereAn optional delegate further describing the desired CelestialBody.
bodiesAn optional list of bodies to start with, as opposed to every body.
Returns
A list of bodies matching the parameters.
static List<CelestialBody> FinePrint.Utilities.ProgressUtilities.GetBodiesProgress ( ProgressType  type,
bool  bodyReached,
bool  progressComplete,
Func< CelestialBody, bool >  where = null,
List< CelestialBody bodies = null 
)
inlinestatic

Gathers a list of bodies that the player has done or not done something at.

Parameters
typeWhat the player did or did not do.
bodyReachedIf the body has any manned or unmanned progress at all.
progressCompleteIf the progress type was completed or not.
whereAn optional delegate further describing the desired CelestialBody.
bodiesAn optional list of bodies to start with, as opposed to every body.
Returns
A list of bodies matching the parameters.
static List<CelestialBody> FinePrint.Utilities.ProgressUtilities.GetBodiesProgress ( ProgressType  type,
bool  progressComplete,
MannedStatus  manned,
Func< CelestialBody, bool >  where = null,
List< CelestialBody bodies = null 
)
inlinestatic

Gathers a list of bodies that the player has done or not done something at.

Parameters
typeWhat the player did or did not do.
progressCompleteIf the progress type was completed or not.
mannedWhether he did it manned or unmanned.
whereAn optional delegate further describing the desired CelestialBody.
bodiesAn optional list of bodies to start with, as opposed to every body.
Returns
A list of bodies matching the parameters.
static List<CelestialBody> FinePrint.Utilities.ProgressUtilities.GetBodiesProgress ( ProgressType  type,
bool  progressComplete,
Func< CelestialBody, bool >  where = null,
List< CelestialBody bodies = null 
)
inlinestatic

Gathers a list of bodies that the player has done or not done something at.

Parameters
typeWhat the player did or did not do.
progressCompleteIf the progress type was completed or not.
whereAn optional delegate further describing the desired CelestialBody.
bodiesAn optional list of bodies to start with, as opposed to every body.
Returns
A list of bodies matching the parameters.
static List<CelestialBody> FinePrint.Utilities.ProgressUtilities.GetBodiesProgress ( bool  bodyReached,
MannedStatus  manned,
Func< CelestialBody, bool >  where = null,
List< CelestialBody bodies = null 
)
inlinestatic

Gathers a list of bodies that the player has done any manned or unmanned progression at.

Parameters
bodyReachedIf the body has any manned or unmanned progress at all.
mannedWhether he did it manned or unmanned.
whereAn optional delegate further describing the desired CelestialBody.
bodiesAn optional list of bodies to start with, as opposed to every body.
Returns
A list of bodies matching the parameters.
static List<CelestialBody> FinePrint.Utilities.ProgressUtilities.GetBodiesProgress ( bool  bodyReached,
Func< CelestialBody, bool >  where = null,
List< CelestialBody bodies = null 
)
inlinestatic

Gathers a list of bodies that the player has done any manned or unmanned progression at.

Parameters
bodyReachedIf the body has any manned or unmanned progress at all.
whereAn optional delegate further describing the desired CelestialBody.
bodiesAn optional list of bodies to start with, as opposed to every body.
Returns
A list of bodies matching the parameters.
static bool FinePrint.Utilities.ProgressUtilities.GetBodyProgress ( ProgressType  progress,
CelestialBody  body,
MannedStatus  manned = MannedStatus.ANY 
)
inlinestatic

Determines if the player has done something on a particular celestial body.

Parameters
progressWhat the player did.
bodyWhere the player did it.
Returns
If the player did it there.
static List<CelestialBody> FinePrint.Utilities.ProgressUtilities.GetNextUnreached ( int  count,
MannedStatus  manned,
Func< CelestialBody, bool >  where = null 
)
inlinestatic

Gets the next few bodies with an unreached manned status.

Parameters
countThe amount of bodies.
mannedThe manned status.
whereAn optional delegate further describing the desired CelestialBody.
Returns
A list of bodies that have not been reached.

< Before we start recursing, we need to seed the stack with the sun and all of its planets.

< We already started with the sun's orbiting bodies.

< Once again, we want to push these in reverse order, so the harder children are further back.

static List<CelestialBody> FinePrint.Utilities.ProgressUtilities.GetNextUnreached ( int  count,
Func< CelestialBody, bool >  where = null 
)
inlinestatic

Gets the next few bodies with an unreached manned status.

Parameters
countThe amount of bodies.
whereAn optional delegate further describing the desired CelestialBody.
Returns
A list of bodies that have not been reached.
static int FinePrint.Utilities.ProgressUtilities.GetProgressLevel ( )
inlinestatic

An integral representation of the player's progress in the game.

Returns
Integer representing progress.

< Some players just don't want to leave Kerbin. Support them by bumping up every three building upgrades or so.

static bool FinePrint.Utilities.ProgressUtilities.HaveAnyTech ( IList< string >  partNames,
IList< string >  moduleNames,
bool  logging = true 
)
inlinestatic

Helper function that determines if any assorted part or module names are unlocked in the tech tree.

Parameters
partNamesThe part names.
moduleNamesThe module names.
loggingAllow logging.
Returns
If any of the techs are researched.
static bool FinePrint.Utilities.ProgressUtilities.HaveModuleTech ( string  moduleName,
string  excludeModule = null 
)
inlinestatic

Determines if the player has researched any parts containing a particular module.

Parameters
moduleNameName of the module to include parts with.
excludeModuleOptional name of module to exclude parts with.
Returns
If the module tech is researched.
static bool FinePrint.Utilities.ProgressUtilities.HavePartTech ( string  partName,
bool  logging = true 
)
inlinestatic

Determines if the player has researched a particular part technology.

Parameters
partNameThe part's name.
loggingOptional flag to temporarily disable logging.
Returns
If the part tech exists and is researched.
static bool FinePrint.Utilities.ProgressUtilities.IntroWorldFirstContract ( ProgressMilestone  milestone)
inlinestatic

Checks to see if a progress milestone is part of the initial lineup of World Firsts leaving Kerbin.

Parameters
milestoneThe milestone.
Returns
If it is in the introduction.
static bool FinePrint.Utilities.ProgressUtilities.OutlierWorldFirstContract ( ProgressType  type,
CelestialBody  body 
)
inlinestatic

Checks to see if a progress milestone is part of the outlier contracts reserved for end game.

Parameters
typeThe progress type.
bodyThe celestial body.
Returns
If it is part of the end game.
static bool FinePrint.Utilities.ProgressUtilities.OutlierWorldFirstContract ( ProgressMilestone  milestone)
inlinestatic

Checks to see if a progress milestone is part of the outlier contracts reserved for end game.

Parameters
milestoneThe milestone.
Returns
If it is part of the end game.
static Contract.ContractPrestige FinePrint.Utilities.ProgressUtilities.ProgressTypePrestige ( ProgressType  type,
CelestialBody  body = null 
)
inlinestatic

Assigns an arbitrary contract prestige to each progress type. Useful for post processing.

Parameters
typeThe progress type.
bodyThe celestial body.
Returns
A prestige level associated with it.
static Contract.ContractPrestige FinePrint.Utilities.ProgressUtilities.ProgressTypePrestige ( ProgressMilestone  milestone)
inlinestatic

Assigns an arbitrary contract prestige to each progress type. Useful for post processing.

Parameters
milestoneThe milestone.
Returns
A prestige level associated with it.
static bool FinePrint.Utilities.ProgressUtilities.ReachedHomeBodies ( )
inlinestatic

Checks if the player has visited all of the bodies in his home system.

Returns
If he's visited all of his home bodies.
static float FinePrint.Utilities.ProgressUtilities.ScoreProgressType ( ProgressType  type,
CelestialBody  body 
)
inlinestatic

Provides a score multiplier for a progress type much like a vessel situation.

Parameters
typeThe progress type.
bodyThe celestial body.
Returns
A score multiplier.
static bool FinePrint.Utilities.ProgressUtilities.VisitedSurfaceOf ( CelestialBody  body,
MannedStatus  manned = MannedStatus.ANY 
)
inlinestatic

Determines whether the player has been on the surface of a planet. Automatically passes on homeworld.

Parameters
bodyThe celestial body.
mannedIf it was visited manned or unmanned.
Returns
Whether the player has been there.
static float FinePrint.Utilities.ProgressUtilities.WorldFirstIntervalReward ( ProgressRewardType  reward,
Currency  currency,
ProgressType  progress,
CelestialBody  body = null,
int  currentInterval = 1,
int  totalIntervals = 10 
)
inlinestatic

Assigns rewards to World First progress nodes and contracts that are split up at an interval.

Parameters
rewardWhether this is for a contract, or a progress node.
currencyThe currency type for the reward.
progressThe progress type.
bodyOptional body for a body multiplier.
currentIntervalWhat interval we are on currently.
totalIntervalsHow many intervals there are total.
Returns
The reward of the given currency type for the current interval.

< If the interval reward is less than one, we have to keep track of when it builds up to one.

static float FinePrint.Utilities.ProgressUtilities.WorldFirstStandardReward ( ProgressRewardType  reward,
Currency  currency,
ProgressType  progress,
CelestialBody  body = null 
)
inlinestatic

Assigns standard rewards to World First progress nodes and contracts.

Parameters
rewardWhether this is for a contract, or a progress node.
currencyThe currency type for the reward.
progressThe progress type.
bodyOptional body for a body multiplier.
Returns
The reward of the given currency type.

< Contracts are already going to post process this with proceeds from GameVariables and prestige, so we'll pop out here.

< Progress proceeds will need to be post processed a bit to keep them in line with contract proceeds.


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