Kerbal Space Program
1.12.4
|
Crew member prototype More...
Public Types | |
enum | Gender { Gender.Male, Gender.Female } |
enum | KerbalSuit { KerbalSuit.Default, KerbalSuit.Vintage, KerbalSuit.Future, KerbalSuit.Slim } |
enum | KerbalType { KerbalType.Crew, KerbalType.Applicant, KerbalType.Unowned, KerbalType.Tourist } |
enum | RosterStatus { RosterStatus.Available, RosterStatus.Assigned, RosterStatus.Dead, RosterStatus.Missing } |
Public Member Functions | |
void | ActiveFixedUpdate (Part p) |
Run for PCMs on an active part in flight (packed or unpacked). Called by part.FixedUpdate Does G checking (if enabled). Then calls the callbacks. More... | |
void | ActiveUpdate (Part p) |
Run for PCMs on an active part in flight (packed or unpacked). Called by part.Update Calls the callbacks. More... | |
void | ArchiveFlightLog () |
float | CalculateExperiencePoints (Game game) |
float | CalculateExperiencePoints (GameParameters parameters, Game.Modes mode) |
bool | ChangeName (string newName) |
bool | CheckActive (double ut) |
void | CheckRespawnTimer (double UT, GameParameters gameParameters) |
void | Die () |
Sets this crewmember as dead More... | |
delegate double | doubleDelegatePCM (ProtoCrewMember pcm) |
override bool | Equals (object obj) |
ExperienceEffect | GetEffect (string effect) |
T | GetEffect< T > () |
override int | GetHashCode () |
string | GetKerbalEVAPartName () |
Get the name of the kerbal EVA part More... | |
string | GetKerbalIconSuitPath () |
Get the kerbal icon path for the suit variant More... | |
string | GetKerbalIconSuitSuffix () |
Get the kerbal icon name sufix for the suit variant More... | |
string | GetKerbalIVAName () |
Get the name of the IVA kerbal prefab More... | |
string | GetLocalizedStatus () |
string | GetLocalizedTrait () |
string | GetLocalizedType () |
bool | HasEffect (string effect) |
bool | HasEffect< T > () |
float | InventoryCosts () |
Get the cost of the ProtoCrewMember Inventory More... | |
float | InventoryMass () |
Get the mass of the ProtoCrewMember Inventory More... | |
void | OnPartPack (Part p) |
void | OnPartUnpack (Part p) |
ProtoCrewMember (KerbalType type) | |
Create a ProtoCrewMember manually More... | |
ProtoCrewMember (KerbalType type, string newName) | |
ProtoCrewMember (ProtoCrewMember copyOf) | |
Creates a ProtoCrewMember as a clone of another one (used for resetting the roster back to startup conditions) More... | |
ProtoCrewMember (Game.Modes mode, ConfigNode node, KerbalType crewType=KerbalType.Crew) | |
Create a ProtoCrewMember from the loaded save string More... | |
void | RegisterExperienceTraits (Part part) |
float | ResourceMass () |
Get the mass of the ProtoCrewMember resources More... | |
void | Save (ConfigNode node) |
Save this PCM to a given confignode More... | |
void | SaveEVAChute (ModuleEvaChute chute) |
Save the ModuleEvaChute to a config node. More... | |
void | SaveInventory (ModuleInventoryPart inventory) |
Save the ModuleInventoryPart to a config node. More... | |
void | SetDefaultInventory () |
Will set the Inventory on this kerbal to the Default loadout. Doing this in flight scene is cheating, but not restricted. More... | |
bool | SetInactive (double time, bool additive=true) |
Sets kerbal inactive for given time More... | |
void | SetTimeForRespawn (double UTforRespawn) |
Starts the respawn cycle for this crewmember to either respawn or be declared dead (based on game parameters) at the given UT (will set him as 'Missing'). (Use this if Planetarium.GetUniversalTime isn't available) More... | |
delegate Kerbal | SpawnKerbalDelegate (ProtoCrewMember pcm) |
void | StartRespawnPeriod (double timeToRespawn=-1d) |
Starts the respawn cycle for this crewmember (will set him as 'Missing'). At the end of this period, he will either be dead or be made available again, depending on game parameters. More... | |
override string | ToString () |
void | UnregisterExperienceTraits (Part part) |
void | Update (double UT) |
Run for all PCMs via KerbalRoster, itself run from Planetarium (so early in the frame) Sets any PCMs active that should be set active. Then calls the callbacks More... | |
void | UpdateExperience () |
delegate void | voidDelegate_PCM (ProtoCrewMember pcm) |
delegate void | voidDelegate_PCM_Part (ProtoCrewMember pcm, Part p) |
delegate void | voidDelegate_PCM_UT (ProtoCrewMember pcm, double UT) |
Static Public Member Functions | |
static double | _GToleranceMult (ProtoCrewMember pcm) |
static double | _MaxSustainedG (ProtoCrewMember pcm) |
static Kerbal | _Spawn (ProtoCrewMember pcm) |
Public Attributes | |
FlightLog | careerLog = new FlightLog() |
Entire career flight log of this crew member More... | |
bool | completedFirstEVA |
Stores true once the kerbal has been on EVA once so we know when to use teh default helmet settings More... | |
float | courage |
Courage of crew member More... | |
float | experience = 0 |
Experience of kerbal More... | |
int | experienceLevel = 0 |
Experience level of kerbal More... | |
ExperienceTrait | experienceTrait = null |
The experience trait that this kerbal has More... | |
FlightLog | flightLog = new FlightLog() |
Flight log of this crew member More... | |
double | geeForce = 0d |
Current g force from the vessel. Note: by default ignores angular velocity. More... | |
double | gExperienced = 0d |
double | gIncrement = 0d |
Set this yourself in ApplyGCallback and then apply it to gExperienced. More... | |
bool | hasHelmetOn |
Stores state of Helmet preference for each kerbal More... | |
bool | hasNeckRingOn |
Stores state of Neck Ring preference for each kerbal More... | |
bool | hasToured |
Flag for tourists set to disappear on next recovery. More... | |
bool | hasVisorDown = false |
Stores state of Helmet preference for each kerbal More... | |
double | inactiveTimeEnd |
When the kerbal was set inactive More... | |
bool | isBadass |
Is this crew member bad ass? More... | |
Kerbal | KerbalRef |
In-game reference of this protocrewmember More... | |
float | lightB = 0f |
float | lightG = 0.5176f |
float | lightR = 1f |
bool | outDueToG = false |
Are we inactive due to Gs? More... | |
uint | persistentID |
Used only when a kerbal is IVA and should only be used for UI purposes. More... | |
InternalSeat | seat = null |
int | seatIdx = -1 |
float | stupidity |
Stupidity of crew member More... | |
string | trait |
The name of the experience trait More... | |
double | UTaR |
UT at respawn (means time at which we can respawn this guy) More... | |
bool | veteran |
Is this crew member a veteran? More... | |
Static Public Attributes | |
static voidDelegate_PCM_Part | ApplyGCallback |
Do your own G processing here and change gExperienced and set gIncrement. To enable, set doStockGCalcs true. More... | |
static voidDelegate_PCM_Part | CallbackActiveFixedUpdate |
static voidDelegate_PCM_Part | CallbackActiveUpdate |
static voidDelegate_PCM_Part | CallbackOnPartPack |
static voidDelegate_PCM_Part | CallbackOnPartUnpack |
static voidDelegate_PCM_UT | CallbackUpdate |
static bool | doStockGCalcs = true |
Set true if you want to use ApplyGCallback instead of stock. More... | |
static doubleDelegatePCM | GToleranceMult = _GToleranceMult |
Multiplier to this kerbals' G tolerance, based on stats/level More... | |
static doubleDelegatePCM | MaxSustainedG = _MaxSustainedG |
static SpawnKerbalDelegate | Spawn = _Spawn |
Protected Attributes | |
bool | _inactive |
Properties | |
ConfigNode | ChuteNode [get, set] |
Saved information for the ModuleEvaChute in a config node so that we can store it in the kerbal roster. This allows the parachute information to persist when the kerbal boards a vessel or is recovered to the space centre. More... | |
string | ComboId [get, set] |
Stock suit identifier. More... | |
string | displayName [get] |
Display name of crew member More... | |
float | ExperienceLevelDelta [get] |
float | ExtraExperience [get, set] |
Gender | gender [get, set] |
double | GExperiencedNormalized [get] |
bool | inactive [get, set] |
Is crew member capable of activity? More... | |
ConfigNode | InventoryNode [get, set] |
Saved information for the ModuleInventoryPart in a config node so that we can store it in the kerbal roster. This allows the Inventory information to persist when the kerbal boards a vessel or is recovered to the space centre. More... | |
bool | isHero [get, set] |
Does this kerbal is a hero kerbal only a few selected kerbals can have this status More... | |
ModuleInventoryPart | KerbalInventoryModule [get] |
Get the ProtoCrewMember's ModuleInventoryPart Instance. You should Null check what is returned to be safe. More... | |
string | name [get] |
Name of crew member (primary key into roster) More... | |
string | nameWithGender [get] |
Name of the kerbal, with the gender suffix added for lingoona More... | |
string | NormalTexturePath [get, set] |
Reference to the extra suit normal texture. More... | |
RosterStatus | rosterStatus [get, set] |
Roster status of this crew member More... | |
string | SpritePath [get, set] |
Reference to the extra suit icon. More... | |
KerbalSuit | suit [get, set] |
Suit type used by this kerbal More... | |
string | SuitTexturePath [get, set] |
Reference to the extra body texture. More... | |
KerbalType | type [get, set] |
Type of this kerbal More... | |
bool | UseStockTexture [get, set] |
Indicates if the selected suit is from stock. More... | |
Crew member prototype
|
inline |
Create a ProtoCrewMember manually
|
inline |
|
inline |
Creates a ProtoCrewMember as a clone of another one (used for resetting the roster back to startup conditions)
copyOf |
|
inline |
Create a ProtoCrewMember from the loaded save string
crewData | |
protoPart |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
Run for PCMs on an active part in flight (packed or unpacked). Called by part.FixedUpdate Does G checking (if enabled). Then calls the callbacks.
p |
|
inline |
Run for PCMs on an active part in flight (packed or unpacked). Called by part.Update Calls the callbacks.
p |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets this crewmember as dead
< don't change the vessel index yet, we still might be drawing the KIA screen
delegate double ProtoCrewMember.doubleDelegatePCM | ( | ProtoCrewMember | pcm | ) |
|
inline |
|
inline |
|
inline |
T | : | ExperienceEffect |
|
inline |
|
inline |
Get the name of the kerbal EVA part
|
inline |
Get the kerbal icon path for the suit variant
|
inline |
Get the kerbal icon name sufix for the suit variant
|
inline |
Get the name of the IVA kerbal prefab
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
T | : | ExperienceEffect |
|
inline |
Get the cost of the ProtoCrewMember Inventory
|
inline |
Get the mass of the ProtoCrewMember Inventory
|
inline |
|
inline |
|
inline |
|
inline |
Get the mass of the ProtoCrewMember resources
ie the resources in the KerbalEVA part
|
inline |
Save this PCM to a given confignode
node |
|
inline |
Save the ModuleEvaChute to a config node.
chute | ModuleEvaChute to be saved. |
|
inline |
Save the ModuleInventoryPart to a config node.
inventory | ModuleInventoryPart to be saved. |
|
inline |
Will set the Inventory on this kerbal to the Default loadout. Doing this in flight scene is cheating, but not restricted.
|
inline |
Sets kerbal inactive for given time
time | |
additive |
|
inline |
Starts the respawn cycle for this crewmember to either respawn or be declared dead (based on game parameters) at the given UT (will set him as 'Missing'). (Use this if Planetarium.GetUniversalTime isn't available)
delegate Kerbal ProtoCrewMember.SpawnKerbalDelegate | ( | ProtoCrewMember | pcm | ) |
|
inline |
Starts the respawn cycle for this crewmember (will set him as 'Missing'). At the end of this period, he will either be dead or be made available again, depending on game parameters.
|
inline |
|
inline |
|
inline |
Run for all PCMs via KerbalRoster, itself run from Planetarium (so early in the frame) Sets any PCMs active that should be set active. Then calls the callbacks
UT |
|
inline |
delegate void ProtoCrewMember.voidDelegate_PCM | ( | ProtoCrewMember | pcm | ) |
delegate void ProtoCrewMember.voidDelegate_PCM_Part | ( | ProtoCrewMember | pcm, |
Part | p | ||
) |
delegate void ProtoCrewMember.voidDelegate_PCM_UT | ( | ProtoCrewMember | pcm, |
double | UT | ||
) |
|
protected |
|
static |
Do your own G processing here and change gExperienced and set gIncrement. To enable, set doStockGCalcs true.
|
static |
|
static |
|
static |
|
static |
|
static |
bool ProtoCrewMember.completedFirstEVA |
Stores true once the kerbal has been on EVA once so we know when to use teh default helmet settings
float ProtoCrewMember.courage |
Courage of crew member
|
static |
Set true if you want to use ApplyGCallback instead of stock.
float ProtoCrewMember.experience = 0 |
Experience of kerbal
int ProtoCrewMember.experienceLevel = 0 |
Experience level of kerbal
ExperienceTrait ProtoCrewMember.experienceTrait = null |
The experience trait that this kerbal has
double ProtoCrewMember.geeForce = 0d |
Current g force from the vessel. Note: by default ignores angular velocity.
double ProtoCrewMember.gExperienced = 0d |
double ProtoCrewMember.gIncrement = 0d |
Set this yourself in ApplyGCallback and then apply it to gExperienced.
|
static |
Multiplier to this kerbals' G tolerance, based on stats/level
bool ProtoCrewMember.hasHelmetOn |
Stores state of Helmet preference for each kerbal
bool ProtoCrewMember.hasNeckRingOn |
Stores state of Neck Ring preference for each kerbal
bool ProtoCrewMember.hasToured |
Flag for tourists set to disappear on next recovery.
bool ProtoCrewMember.hasVisorDown = false |
Stores state of Helmet preference for each kerbal
double ProtoCrewMember.inactiveTimeEnd |
When the kerbal was set inactive
bool ProtoCrewMember.isBadass |
Is this crew member bad ass?
Kerbal ProtoCrewMember.KerbalRef |
In-game reference of this protocrewmember
float ProtoCrewMember.lightB = 0f |
float ProtoCrewMember.lightG = 0.5176f |
float ProtoCrewMember.lightR = 1f |
|
static |
bool ProtoCrewMember.outDueToG = false |
Are we inactive due to Gs?
uint ProtoCrewMember.persistentID |
Used only when a kerbal is IVA and should only be used for UI purposes.
InternalSeat ProtoCrewMember.seat = null |
int ProtoCrewMember.seatIdx = -1 |
|
static |
float ProtoCrewMember.stupidity |
Stupidity of crew member
string ProtoCrewMember.trait |
The name of the experience trait
double ProtoCrewMember.UTaR |
UT at respawn (means time at which we can respawn this guy)
bool ProtoCrewMember.veteran |
Is this crew member a veteran?
|
getset |
Saved information for the ModuleEvaChute in a config node so that we can store it in the kerbal roster. This allows the parachute information to persist when the kerbal boards a vessel or is recovered to the space centre.
|
getset |
Stock suit identifier.
|
get |
Display name of crew member
This checks the 4 hero kerbal names are returning their localized versions
|
get |
|
getset |
|
getset |
|
get |
|
getset |
Is crew member capable of activity?
|
getset |
Saved information for the ModuleInventoryPart in a config node so that we can store it in the kerbal roster. This allows the Inventory information to persist when the kerbal boards a vessel or is recovered to the space centre.
|
getset |
Does this kerbal is a hero kerbal only a few selected kerbals can have this status
|
get |
Get the ProtoCrewMember's ModuleInventoryPart Instance. You should Null check what is returned to be safe.
|
get |
Name of crew member (primary key into roster)
|
get |
Name of the kerbal, with the gender suffix added for lingoona
|
getset |
Reference to the extra suit normal texture.
|
getset |
Roster status of this crew member
|
getset |
Reference to the extra suit icon.
|
getset |
Suit type used by this kerbal
|
getset |
Reference to the extra body texture.
|
getset |
Type of this kerbal
|
getset |
Indicates if the selected suit is from stock.