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

Represents the saved state of a part in a ship More...

Public Member Functions

void AddProtoPartModuleAdjusters (List< AdjusterPartModuleBase > ModuleAdjusters)
 Applies given module adjusters to the appropriate part modules More...
 
Part CreatePart ()
 Creates a Part object from the ProtoPart. More...
 
ProtoPartModuleSnapshot FindModule (string moduleName)
 Finds a Module Snapshot of the given modulename, back-first More...
 
ProtoPartModuleSnapshot FindModule (PartModule pm, int moduleIndex)
 
ProtoCrewMember GetCrew (string name)
 
ProtoCrewMember GetCrew (int index)
 
int GetCrewIndex (string name)
 
bool HasCrew (string name)
 
void Init (Vessel vesselRef)
 
Part Load (Vessel vesselRef, bool loadAsRootPart)
 Creates Part objects from the abstraction. Don't forget to call Init() later. More...
 
void ProtoPartRepair ()
 Repair all the modules of this part. More...
 
 ProtoPartSnapshot (Part PartRef, ProtoVessel protoVessel)
 
 ProtoPartSnapshot (Part PartRef, ProtoVessel protoVessel, bool preCreate)
 
 ProtoPartSnapshot (ConfigNode node, ProtoVessel protoVessel, Game st)
 
void RemoveCrew (string name)
 
void RemoveCrew (int index)
 
void RemoveCrew (ProtoCrewMember pcm)
 
void RemoveProtoPartModuleAdjusters (List< AdjusterPartModuleBase > ModuleAdjusters)
 Removes given module adjusters from the appropriate part modules More...
 
void Save (ConfigNode node)
 
void storePartRefs ()
 

Public Attributes

bool attached
 
int attachMode
 
List< AttachNodeSnapshotattachNodes
 
Part.AutoStrutMode autostrutMode
 
uint craftID
 
string customPartData
 
int defaultInverseStage
 
float explosionPotential
 
string flagURL
 
uint flightID
 
int inStageIndex
 
int inverseStageIndex
 
uint launchID
 
float mass
 The mass of this part - including modeleMass More...
 
Vector3 mirror
 
uint missionID
 
int moduleCargoStackableQuantity = 1
 The stacking capcity of this part if its a cargoPart More...
 
float moduleCosts
 The cost of all the modules on this part More...
 
float moduleMass
 The mass of all the modules on this part at the time the snapshot was created More...
 
List< ProtoPartModuleSnapshotmodules
 
string moduleVariantName
 The variant name that was stored with this part More...
 
ProtoPartSnapshot parent
 
int parentIdx
 
ConfigNode partActions
 
ConfigNode partData
 
ConfigNode partEffects
 
ConfigNode partEvents
 
AvailablePart partInfo
 
string partName
 
Part partRef
 
List< string > partRendererBoundsIgnore
 
Dictionary< string, KSPParseablepartStateValues
 
uint persistentId
 
Vector3d position
 
int PreFailState
 
List< int > protoCrewIndicesBackup
 
List< string > protoCrewNames
 
List< ProtoCrewMemberprotoModuleCrew
 
ProtoVessel pVesselRef
 
string refTransformName
 
int resourcePriorityOffset
 
List< ProtoPartResourceSnapshotresources
 
bool rigidAttachment
 
Part rootPartPrefab
 root parts don't get instantiated directly. Instead, they have their components copied to the vessel GO, and all their children moved as well. This reference to the original part prefab will remain alive until the ProtoPart loading is complete. Use to reset references on part modules and such. More...
 
Quaternion rotation
 
bool sameVesselCollision = false
 
int separationIndex
 
int seqOverride
 
bool shielded
 
AttachNodeSnapshot srfAttachNode
 
int stageIndex
 
int state
 
double staticPressureAtm
 
List< int > symLinkIdxs
 
List< ProtoPartSnapshotsymLinks
 
SymmetryMethod symMethod
 
double temperature
 
VesselNaming vesselNaming
 

Properties

Part partPrefab [get]
 

Detailed Description

Represents the saved state of a part in a ship

Constructor & Destructor Documentation

ProtoPartSnapshot.ProtoPartSnapshot ( Part  PartRef,
ProtoVessel  protoVessel 
)
inline
ProtoPartSnapshot.ProtoPartSnapshot ( Part  PartRef,
ProtoVessel  protoVessel,
bool  preCreate 
)
inline

< store staging info

ProtoPartSnapshot.ProtoPartSnapshot ( ConfigNode  node,
ProtoVessel  protoVessel,
Game  st 
)
inline

< NOTE: Unless you want KSPParseable to grab the item, do NOT remove it from this list, just make a null op (see connected)

Member Function Documentation

void ProtoPartSnapshot.AddProtoPartModuleAdjusters ( List< AdjusterPartModuleBase ModuleAdjusters)
inline

Applies given module adjusters to the appropriate part modules

Template Parameters
ModuleAdjustersList of module adjusters to apply
Part ProtoPartSnapshot.CreatePart ( )
inline

Creates a Part object from the ProtoPart.

ProtoPartModuleSnapshot ProtoPartSnapshot.FindModule ( string  moduleName)
inline

Finds a Module Snapshot of the given modulename, back-first

Parameters
moduleName
Returns
ProtoPartModuleSnapshot ProtoPartSnapshot.FindModule ( PartModule  pm,
int  moduleIndex 
)
inline

< if we failed, try to find it in the list of module snapshots.

ProtoCrewMember ProtoPartSnapshot.GetCrew ( string  name)
inline
ProtoCrewMember ProtoPartSnapshot.GetCrew ( int  index)
inline
int ProtoPartSnapshot.GetCrewIndex ( string  name)
inline
bool ProtoPartSnapshot.HasCrew ( string  name)
inline
void ProtoPartSnapshot.Init ( Vessel  vesselRef)
inline
Part ProtoPartSnapshot.Load ( Vessel  vesselRef,
bool  loadAsRootPart 
)
inline

Creates Part objects from the abstraction. Don't forget to call Init() later.

< Added for Unity 4 Support CJ

< copy part component

< copy effect behaviours

< copy resources

void ProtoPartSnapshot.ProtoPartRepair ( )
inline

Repair all the modules of this part.

void ProtoPartSnapshot.RemoveCrew ( string  name)
inline
void ProtoPartSnapshot.RemoveCrew ( int  index)
inline
void ProtoPartSnapshot.RemoveCrew ( ProtoCrewMember  pcm)
inline
void ProtoPartSnapshot.RemoveProtoPartModuleAdjusters ( List< AdjusterPartModuleBase ModuleAdjusters)
inline

Removes given module adjusters from the appropriate part modules

Template Parameters
ModuleAdjustersList of module adjusters to remove.
void ProtoPartSnapshot.Save ( ConfigNode  node)
inline
void ProtoPartSnapshot.storePartRefs ( )
inline

Member Data Documentation

bool ProtoPartSnapshot.attached
int ProtoPartSnapshot.attachMode
List<AttachNodeSnapshot> ProtoPartSnapshot.attachNodes
Part.AutoStrutMode ProtoPartSnapshot.autostrutMode
uint ProtoPartSnapshot.craftID
string ProtoPartSnapshot.customPartData
int ProtoPartSnapshot.defaultInverseStage
float ProtoPartSnapshot.explosionPotential
string ProtoPartSnapshot.flagURL
uint ProtoPartSnapshot.flightID
int ProtoPartSnapshot.inStageIndex
int ProtoPartSnapshot.inverseStageIndex
uint ProtoPartSnapshot.launchID
float ProtoPartSnapshot.mass

The mass of this part - including modeleMass

Vector3 ProtoPartSnapshot.mirror
uint ProtoPartSnapshot.missionID
int ProtoPartSnapshot.moduleCargoStackableQuantity = 1

The stacking capcity of this part if its a cargoPart

Obtained from ModuleCargoPart at the time the snapshot was created

float ProtoPartSnapshot.moduleCosts

The cost of all the modules on this part

Obtained from ICostModifier at the time the snapshot was created

float ProtoPartSnapshot.moduleMass

The mass of all the modules on this part at the time the snapshot was created

Obtained from IMassModifier at the time the snapshot was created

List<ProtoPartModuleSnapshot> ProtoPartSnapshot.modules
string ProtoPartSnapshot.moduleVariantName

The variant name that was stored with this part

Obtained from ModulePartVariant at the time the snapshot was created

ProtoPartSnapshot ProtoPartSnapshot.parent
int ProtoPartSnapshot.parentIdx
ConfigNode ProtoPartSnapshot.partActions
ConfigNode ProtoPartSnapshot.partData
ConfigNode ProtoPartSnapshot.partEffects
ConfigNode ProtoPartSnapshot.partEvents
AvailablePart ProtoPartSnapshot.partInfo
string ProtoPartSnapshot.partName
Part ProtoPartSnapshot.partRef
List<string> ProtoPartSnapshot.partRendererBoundsIgnore
Dictionary<string, KSPParseable> ProtoPartSnapshot.partStateValues
uint ProtoPartSnapshot.persistentId
Vector3d ProtoPartSnapshot.position
int ProtoPartSnapshot.PreFailState
List<int> ProtoPartSnapshot.protoCrewIndicesBackup
List<string> ProtoPartSnapshot.protoCrewNames
List<ProtoCrewMember> ProtoPartSnapshot.protoModuleCrew
ProtoVessel ProtoPartSnapshot.pVesselRef
string ProtoPartSnapshot.refTransformName
int ProtoPartSnapshot.resourcePriorityOffset
List<ProtoPartResourceSnapshot> ProtoPartSnapshot.resources
bool ProtoPartSnapshot.rigidAttachment
Part ProtoPartSnapshot.rootPartPrefab

root parts don't get instantiated directly. Instead, they have their components copied to the vessel GO, and all their children moved as well. This reference to the original part prefab will remain alive until the ProtoPart loading is complete. Use to reset references on part modules and such.

Quaternion ProtoPartSnapshot.rotation
bool ProtoPartSnapshot.sameVesselCollision = false
int ProtoPartSnapshot.separationIndex
int ProtoPartSnapshot.seqOverride
bool ProtoPartSnapshot.shielded
AttachNodeSnapshot ProtoPartSnapshot.srfAttachNode
int ProtoPartSnapshot.stageIndex
int ProtoPartSnapshot.state
double ProtoPartSnapshot.staticPressureAtm
List<int> ProtoPartSnapshot.symLinkIdxs
List<ProtoPartSnapshot> ProtoPartSnapshot.symLinks
SymmetryMethod ProtoPartSnapshot.symMethod
double ProtoPartSnapshot.temperature
VesselNaming ProtoPartSnapshot.vesselNaming

Property Documentation

Part ProtoPartSnapshot.partPrefab
get

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