Kerbal Space Program
1.12.4
|
Class which represents the parts in a vessel and the crew members which are assigned to them. More...
Public Member Functions | |
bool | AnyCrewInState (ProtoCrewMember.RosterStatus state, bool notInState=false) |
Checks whether there are any crew members in the VesselCrewManifest in a certain state. More... | |
bool | AnyCrewInState (ProtoCrewMember.RosterStatus state, KerbalRoster roster, bool notInState=false) |
Checks whether there are any crew members in the VesselCrewManifest in a certain state. More... | |
bool | AnyCrewWithTrait (string trait, bool noCrewWithTrait=false) |
Checks whether there are any crew members in the VesselCrewManifest with a certain trait. More... | |
bool | AnyCrewWithTrait (string trait, KerbalRoster roster, bool noCrewWithTrait=false) |
Checks whether there are any crew members in the VesselCrewManifest with a certain trait. More... | |
void | AssignCrewToVessel (ShipConstruct ship) |
Assigns the crew in this VesselCrewManifest to the ship. More... | |
void | AssignCrewToVessel (ShipConstruct ship, KerbalRoster roster) |
Assigns the crew in this VesselCrewManifest to the ship. More... | |
bool | Contains (ProtoCrewMember crew) |
Check whether the VesselCrewManifest contains a crew member. More... | |
void | DebugManifest () |
Print out information concerning all the seats (and their occupants) in this VesselCrewManifest. More... | |
void | Filter (Func< PartCrewManifest, bool > inclusionFilter) |
Filters this vessel manifest excluding parts that don't meet the given criteria. More... | |
List< ProtoCrewMember > | GetAllCrew (bool includeNulls) |
Get a list of all of the crew in the VesselCrewManifest. More... | |
List< ProtoCrewMember > | GetAllCrew (bool includeNulls, KerbalRoster roster) |
Get a list of all of the crew in the VesselCrewManifest. More... | |
List< PartCrewManifest > | GetCrewableParts () |
Get a list of the parts which can be crewed. More... | |
float | GetCrewInventoryCosts (KerbalRoster roster=null) |
Get the Crew Inventory Costs. If roster is not supplied will use HighLogic.CurrentGame.CrewRoster. More... | |
float | GetCrewInventoryMass () |
Get the Crew Inventory Mass. Will use HighLogic.CurrentGame.CrewRoster. More... | |
float | GetCrewInventoryMass (KerbalRoster roster) |
Get the Crew Inventory Mass. If roster is not supplied will use HighLogic.CurrentGame.CrewRoster. More... | |
float | GetCrewResourceMass () |
Get the Crew Resource Mass. Will use HighLogic.CurrentGame.CrewRoster. More... | |
float | GetCrewResourceMass (KerbalRoster roster) |
Get the Crew Resource Mass. If roster is not supplied will use HighLogic.CurrentGame.CrewRoster. More... | |
PartCrewManifest | GetPartCrewManifest (uint id) |
Gets the PartCrewManifest with the specified id More... | |
PartCrewManifest | GetPartForCrew (ProtoCrewMember crew) |
Gets the PartCrewManifest in which the crew member is seated. More... | |
bool | HasAnyCrew () |
Checks whether there are any crew members in the VesselCrewManifest. More... | |
bool | HasAnyCrew (KerbalRoster roster) |
Checks whether there are any crew members in the VesselCrewManifest. More... | |
void | RemoveCrewMember (string cName) |
Removes a crew member from the previously assigned part and this crew manifest. More... | |
void | RemovePartManifest (PartCrewManifest pcm) |
Removes the part and the crew assigned to it from this VesselCrewManifest. More... | |
void | SetCrewMember (string cName, PartCrewManifest pcm) |
Removes a crew member from its previously assigned part and assigns it to the new part. More... | |
void | SetPartManifest (uint id, PartCrewManifest newPCMtoUse) |
Adds a PartCrewManifest with the specified id. Removes the crew from the previous part if there was one using the specified id, then removes the part. Checks whether the crew in the new part are assigned to a previously used part and removes them from that previously used part if they are. More... | |
void | SetPartManifestNoOverwrite (uint id, PartCrewManifest newPCMtoUse) |
Adds a PartCrewManifest with the specified id. Removes the crew from the previous part if there was one using the specified id, then removes the part. Checks whether the crew in the new part are assigned to a previously used part and removes them from the new part if they are. More... | |
VesselCrewManifest | UpdateCrewForVessel (ConfigNode vesselNode, System.Func< PartCrewManifest, bool > persistFilter=null) |
Creates a new VesselCrewManifest from vesselNode. Then assigns the crew members from this VesselCrewManifest to the new VesselCrewManifest if they pass the persistFilter. More... | |
void | UpdatePartManifest (uint id, PartCrewManifest referencePCM) |
Updates a PartCrewManifest with the specified id to have the crew members in the referencePCM. Removes the crew in the referencePCM from the previous assigned part if there was one. Then assigns the crew in the referencePCM to the part with the specified id. More... | |
VesselCrewManifest () | |
Base constructor. More... | |
Static Public Member Functions | |
static VesselCrewManifest | CloneOf (VesselCrewManifest original, bool blank) |
Clone a vessel crew manifest. More... | |
static VesselCrewManifest | FromConfigNode (ConfigNode craftNode) |
Generate a vessel crew manifest based on a craft node. More... | |
static void | MergeInto (VesselCrewManifest m1, VesselCrewManifest m2, Func< PartCrewManifest, bool > inclusionFilter=null) |
Merge m2 into m1 and discard anything failing the the inclusion filter. If an entry is contained in both, the one from m1 is kept. If a crewmember is present in more than one part, it will be removed from any parts after the first ocurrence. More... | |
Properties | |
int | CrewCount [get] |
Number of crew members in the vessel. More... | |
float | CrewCountOptimizedForFloat [get] |
Number of crew members in the vessel. (Returned as a float) More... | |
int | PartCount [get] |
Number of parts in the vessel. More... | |
List< PartCrewManifest > | PartManifests [get] |
List of the parts in the vessel. More... | |
Class which represents the parts in a vessel and the crew members which are assigned to them.
|
inline |
Base constructor.
|
inline |
Checks whether there are any crew members in the VesselCrewManifest in a certain state.
state | State to check for. |
notInState | If false, returns true when any crew member is in that state. If true, returns true when any crew member is not in that state. |
|
inline |
Checks whether there are any crew members in the VesselCrewManifest in a certain state.
state | State to check for. |
roster | Roster to get the crew member information from. |
notInState | If false, returns true when any crew member is in that state. If true, returns true when any crew member is not in that state. |
|
inline |
Checks whether there are any crew members in the VesselCrewManifest with a certain trait.
trait | Trait to check for. |
noCrewWithTrait | If false, returns true when any crew member has that trait. If true, returns true when any crew member doesn't have that trait. |
|
inline |
Checks whether there are any crew members in the VesselCrewManifest with a certain trait.
trait | Trait to check for. |
roster | Roster to get the crew member information from. |
noCrewWithTrait | If false, returns true when any crew member has that trait. If true, returns true when any crew member doesn't have that trait. |
|
inline |
Assigns the crew in this VesselCrewManifest to the ship.
ship | Ship to assign the crew to. |
|
inline |
Assigns the crew in this VesselCrewManifest to the ship.
ship | Ship to assign the crew to. |
roster | Roster to get the crew member information from. |
|
inlinestatic |
Clone a vessel crew manifest.
original | VesselCrewManifest to be cloned |
blank | If false, crew members from the original VesselCrewManifest will be seated in the clone. If true, there will be no crew members in the clone. |
|
inline |
Check whether the VesselCrewManifest contains a crew member.
crew | Crew member to search for. |
|
inline |
Print out information concerning all the seats (and their occupants) in this VesselCrewManifest.
|
inline |
Filters this vessel manifest excluding parts that don't meet the given criteria.
inclusionFilter | Filter to apply to the parts. |
|
inlinestatic |
Generate a vessel crew manifest based on a craft node.
craftNode | Vessel to be populated |
|
inline |
Get a list of all of the crew in the VesselCrewManifest.
includeNulls | VesselCrewManifest to be cloned |
|
inline |
Get a list of all of the crew in the VesselCrewManifest.
includeNulls | VesselCrewManifest to be cloned |
roster | Roster to use to get the kerbal information. |
|
inline |
Get a list of the parts which can be crewed.
|
inline |
Get the Crew Inventory Costs. If roster is not supplied will use HighLogic.CurrentGame.CrewRoster.
roster | The KerbalRoster to use, if you don't want to use HighLogic.CurrentGame.CrewRoster |
|
inline |
Get the Crew Inventory Mass. Will use HighLogic.CurrentGame.CrewRoster.
|
inline |
Get the Crew Inventory Mass. If roster is not supplied will use HighLogic.CurrentGame.CrewRoster.
roster | Set to Null for HighLogic.CurrentGame.CrewRoster. Otherwise set to the KerbalRoster to use |
|
inline |
Get the Crew Resource Mass. Will use HighLogic.CurrentGame.CrewRoster.
|
inline |
Get the Crew Resource Mass. If roster is not supplied will use HighLogic.CurrentGame.CrewRoster.
roster | Set to Null for HighLogic.CurrentGame.CrewRoster. Otherwise set to the KerbalRoster to use |
|
inline |
Gets the PartCrewManifest with the specified id
id | id to search for. |
|
inline |
Gets the PartCrewManifest in which the crew member is seated.
crew | Crew member to search for. |
|
inline |
Checks whether there are any crew members in the VesselCrewManifest.
|
inline |
Checks whether there are any crew members in the VesselCrewManifest.
roster | Roster to get the crew member information from. |
|
inlinestatic |
Merge m2 into m1 and discard anything failing the the inclusion filter. If an entry is contained in both, the one from m1 is kept. If a crewmember is present in more than one part, it will be removed from any parts after the first ocurrence.
|
inline |
Removes a crew member from the previously assigned part and this crew manifest.
cName | Crew member to be removed. |
|
inline |
Removes the part and the crew assigned to it from this VesselCrewManifest.
pcm | Part to be removed. |
|
inline |
Removes a crew member from its previously assigned part and assigns it to the new part.
cName | Crew member to set. |
pcm | Part to assign the crew member to. |
|
inline |
Adds a PartCrewManifest with the specified id. Removes the crew from the previous part if there was one using the specified id, then removes the part. Checks whether the crew in the new part are assigned to a previously used part and removes them from that previously used part if they are.
id | ID to assign the new part. |
newPCMtoUse | PartCrewManifest to add. |
|
inline |
Adds a PartCrewManifest with the specified id. Removes the crew from the previous part if there was one using the specified id, then removes the part. Checks whether the crew in the new part are assigned to a previously used part and removes them from the new part if they are.
id | ID to assign the new part. |
newPCMtoUse | PartCrewManifest to add. |
|
inline |
Creates a new VesselCrewManifest from vesselNode. Then assigns the crew members from this VesselCrewManifest to the new VesselCrewManifest if they pass the persistFilter.
vesselNode | ConfigNode to create the new VesselCrewManifest from. |
persistFilter | Filter to apply to crew members. If they pass it, they get on the new VesselCrewManifest. |
|
inline |
Updates a PartCrewManifest with the specified id to have the crew members in the referencePCM. Removes the crew in the referencePCM from the previous assigned part if there was one. Then assigns the crew in the referencePCM to the part with the specified id.
id | Crew member to search for. |
referencePCM | Crew member to search for. |
< just in case
|
get |
Number of crew members in the vessel.
|
get |
Number of crew members in the vessel. (Returned as a float)
|
get |
Number of parts in the vessel.
|
get |
List of the parts in the vessel.