Kerbal Space Program
1.12.4
|
Static Public Member Functions | |
static bool | ActiveVesselFallback (ref Vessel v, bool logging=true) |
Sets a vessel to the active vessel if it is null and it is possible. More... | |
static int | ActualCrewCapacity (Vessel v=null) |
Checks a vessel for its actual crew capacity, works for protovessels. More... | |
static Dictionary< Vessel, VesselType > | ClassifyAllVesselsAt (CelestialBody body, bool useVesselType=true) |
Identifies the vessel type of all vessels at a particular celestial body. More... | |
static VesselType | ClassifyVesselType (Vessel v=null, bool useVesselType=true) |
Classifies the type of a vessel based on its physical characteristics, not an arbitrarily defined type. More... | |
static int | CrewTraitMissionAvailability (string trait, CelestialBody targetBody=null, Vessel excludeVessel=null) |
Determines how many kerbals with a particular experience trait are available or already near the area of a mission. More... | |
static void | DiscoverVessel (Vessel v=null) |
Marks a vessel as "owned" with the discovery system. More... | |
static Vector3 | EstimatePartSize (Part p) |
Estimates the size of a part, taking SkinnedMeshRenderer oddities into account. More... | |
static Part | FindFirstPartOrModuleName (List< string > partNames, List< string > moduleNames) |
Does a simple search for the first part that exists in a list of part and module names. More... | |
static Vessel | FindVesselWithPartIDs (List< uint > partIDs) |
Finds a vessel with the most part IDs from a given list. More... | |
static Orbit | GenerateAdjustedVesselOrbit (double minimumDeviation, double modificationLength, int numberOfModifications, System.Random generator=null, Vessel v=null) |
Returns a vessel's orbit with a slight modification by a certain percentage. More... | |
static FlightBand | GetFlightBand (double threshold, Vessel v=null) |
Gets the flight band of a vessel based on an altitude threshold. More... | |
static List< uint > | GetPartIDList (Vessel v=null) |
Gets a list of part IDs for a specific vessel. More... | |
static string | GetPartName (Part p) |
Grabs the name of a part using its part info. More... | |
static List< Vessel > | SpecificVesselClassAt (CelestialBody body, VesselType vesselType, bool requireOwned=false, bool excludeActive=false, bool useVesselType=true) |
Identifies the vessels at a particular celestial body and collects those of a particular type. More... | |
static List< Vessel > | SpecificVesselClassAt (Vessel.Situations situation, CelestialBody body, VesselType vesselType, bool requireOwned=false, bool excludeActive=false, bool useVesselType=true) |
Identifies the vessels at a particular celestial body and collects those of a particular type. More... | |
static bool | VesselAtOrbit (Orbit o, double deviationWindow, Vessel v=null) |
Checks whether a specific vessel is present at or near a specific orbit. More... | |
static double | VesselAtOrbitAccuracy (Orbit o, double deviationWindow, Vessel v=null) |
Gets the accuracy whether a specific vessel is present at or near a specific orbit. More... | |
static List< ProtoCrewMember > | VesselCrewWithTrait (string trait, Vessel v=null) |
Gets a List of the ProtoCrewMembers on a vessel with a certain experience trait. More... | |
static int | VesselCrewWithTraitCount (string trait, Vessel v=null) |
Gets a count of the ProtoCrewMembers on a vessel with a certain experience trait. More... | |
static bool | VesselHasAnyModules (List< string > moduleList, Vessel v=null) |
Checks a vessel for many modules at once, to save performance. More... | |
static bool | VesselHasAnyParts (List< string > partList, Vessel v=null) |
Checks a vessel for many parts at once, to save performance. More... | |
static bool | VesselHasAnyPartsOrModules (List< string > partList, List< string > moduleList, Vessel v=null) |
Checks a vessel for many different things at once, to save performance. More... | |
static bool | VesselHasModuleName (string moduleName, Vessel v=null) |
Checks a vessel for a specific module. More... | |
static bool | VesselHasPartName (string partName, Vessel v=null) |
Checks a vessel for a specific part. More... | |
static bool | VesselHasWheelsOnGround (Vessel v=null, params WheelType[] validWheelTypes) |
Determines whether the vessel is landed with wheels. More... | |
static uint | VesselID (Vessel v=null) |
Grabs the flightID of a vessel's root part. More... | |
static bool | VesselIsOwned (Vessel v=null) |
Checks if a vessel is "owned" with the discovery system. More... | |
static bool | VesselLaunchedAfterID (uint launchID, Vessel v, params string[] ignore) |
Makes sure a vessel was launched after a certain point. More... | |
static int | VesselPartAndModuleCount (List< string > partList, List< string > moduleList, Vessel v=null) |
Checks a vessel for many different things at once, to save performance, returns full amount More... | |
static double | VesselResourceAmount (string resourceName, Vessel v=null) |
Calculates how much of a particular resource is on a vessel. More... | |
Properties | |
static int | HighestPodCapacity [get] |
Determines the highest pod capacity in the game. More... | |
|
inlinestatic |
Sets a vessel to the active vessel if it is null and it is possible.
v | The vessel. |
logging | Optional flag to temporarily disable logging. |
|
inlinestatic |
Checks a vessel for its actual crew capacity, works for protovessels.
v | Optional vessel if not ActiveVessel. |
|
inlinestatic |
Identifies the vessel type of all vessels at a particular celestial body.
body | The celestial body. |
useVesselType | Use part config vesselType if vessel cannot be classified. |
|
inlinestatic |
Classifies the type of a vessel based on its physical characteristics, not an arbitrarily defined type.
v | Optional vessel if not ActiveVessel. |
useVesselType | Use part config vesselType if vessel cannot be classified. |
|
inlinestatic |
Determines how many kerbals with a particular experience trait are available or already near the area of a mission.
trait | The trait name. |
targetBody | The target body of the mission. |
excludeVessel | A vessel to exclude in the search. |
< Tourists are treated a bit differently, we need to scan active and offered contracts, and look at where they are heading.
< This tourist is heading to where our request is at anyway, and might want to visit our establishment.
< Now for the ones in the wilderness. We want to find ones that are near the target body, but not on excludeVessel.
|
inlinestatic |
Marks a vessel as "owned" with the discovery system.
v | Optional vessel if not ActiveVessel. |
|
inlinestatic |
Estimates the size of a part, taking SkinnedMeshRenderer oddities into account.
p | The part. |
|
inlinestatic |
Does a simple search for the first part that exists in a list of part and module names.
partNames | The list of part names. |
moduleNames | The list of module names. |
|
inlinestatic |
Finds a vessel with the most part IDs from a given list.
partIDs | A list of part IDs. |
< By following the largest chunk of a collection of parts, we can follow a vessel even if it blows up into a million pieces.
|
inlinestatic |
Returns a vessel's orbit with a slight modification by a certain percentage.
minimumDeviation | The matching deviation of the contract. |
modificationLength | The length of the resulting adjustment after deviation. |
numberOfModifications | The number of properties of the orbit to modify. |
generator | An optional random generator to use. |
v | Optional vessel if not ActiveVessel. |
< Do not attempt to adjust hyperbolic orbits. It ends badly.
< Modifications will be to inclination, argument if eccentric, LAN if inclined, periapsis, and apoapsis.
< LAN changes are not fun at horizontal inclinations.
< And argument changes are not fun in circular orbits.
< We want to modify a few properties (modCount), shuffle and remove all but those.
< If inclination is negative, fix it and flip the LAN.
|
inlinestatic |
Gets the flight band of a vessel based on an altitude threshold.
threshold | The border between high and low altitudes. |
v | Optional vessel if not ActiveVessel. |
|
inlinestatic |
Gets a list of part IDs for a specific vessel.
v | Optional vessel if not ActiveVessel. |
|
inlinestatic |
Grabs the name of a part using its part info.
p | The part. |
|
inlinestatic |
Identifies the vessels at a particular celestial body and collects those of a particular type.
body | The celestial body. |
vesselType | The vessel classification. |
requireOwned | Skip unowned vessels. |
excludeActive | Skip active vessels. |
useVesselType | Use part config vesselType if vessel cannot be classified. |
|
inlinestatic |
Identifies the vessels at a particular celestial body and collects those of a particular type.
situation | The vessel situation. |
body | The celestial body. |
vesselType | The vessel classification. |
requireOwned | Skip unowned vessels. |
excludeActive | Skip active vessels. |
useVesselType | Use part config vesselType if vessel cannot be classified. |
|
inlinestatic |
Checks whether a specific vessel is present at or near a specific orbit.
o | The specific orbit. |
deviationWindow | The acceptable margin - percent value 0->100. |
v | Optional vessel if not ActiveVessel. |
< Check periapsis and apoapsis, enforce minimum deviation to prevent low orbits (Molniya) from becoming super hard to match.
< Argdifference was originally argument of periapsis, but on horizontal orbits, use longitude of periapsis instead.
< Only checks argument of periapsis on non-circular orbits.
|
inlinestatic |
Gets the accuracy whether a specific vessel is present at or near a specific orbit.
o | The specific orbit. |
accuracy | The accuracy we are expecting as a percentage. eg: 80% - pass in 80 |
v | Optional vessel if not ActiveVessel. |
|
inlinestatic |
Gets a List of the ProtoCrewMembers on a vessel with a certain experience trait.
trait | The trait name. |
v | Optional vessel if not ActiveVessel. |
|
inlinestatic |
Gets a count of the ProtoCrewMembers on a vessel with a certain experience trait.
trait | The trait name. |
v | Optional vessel if not ActiveVessel. |
|
inlinestatic |
Checks a vessel for many modules at once, to save performance.
moduleList | A list of module names. |
v | Optional vessel if not ActiveVessel. |
|
inlinestatic |
Checks a vessel for many parts at once, to save performance.
partList | A list of part names. |
v | Optional vessel if not ActiveVessel. |
|
inlinestatic |
Checks a vessel for many different things at once, to save performance.
partList | A list of part names. |
moduleList | A list of module names. |
v | Optional vessel if not ActiveVessel. |
< Double check all of the parameters, redirect to appropriate methods if something's awry.
< This gets pretty deep, but it's best to do this all in one loop, rather than multiple loops.
|
inlinestatic |
Checks a vessel for a specific module.
moduleName | Name of the module. |
v | Optional vessel if not ActiveVessel. |
|
inlinestatic |
Checks a vessel for a specific part.
partName | Name of the part. |
v | Optional vessel if not ActiveVessel. |
< Part names cannot have underscores.
|
inlinestatic |
Determines whether the vessel is landed with wheels.
v | Optional vessel if not ActiveVessel. |
validWheelTypes | Wheel types that are checked. |
|
inlinestatic |
Grabs the flightID of a vessel's root part.
v | Optional vessel if not ActiveVessel. |
|
inlinestatic |
Checks if a vessel is "owned" with the discovery system.
v | Optional vessel if not ActiveVessel. |
|
inlinestatic |
Makes sure a vessel was launched after a certain point.
launchID | The launch ID to compare. |
v | The vessel to check. |
ignore | Optional part names to ignore in the check. |
|
inlinestatic |
Checks a vessel for many different things at once, to save performance, returns full amount
partList | A list of part names. |
moduleList | A list of module names. |
v | Optional vessel if not ActiveVessel. |
< This gets pretty deep, but it's best to do this all in one loop, rather than multiple loops.
|
inlinestatic |
Calculates how much of a particular resource is on a vessel.
resourceName | The name of the resource. |
v | Optional vessel if not ActiveVessel. |
|
staticget |
Determines the highest pod capacity in the game.