Class ObjectAssemblyPart
- Namespace
- KSP.OAB
- Assembly
- Assembly-CSharp.dll
public class ObjectAssemblyPart : MonoBehaviour, IObjectAssemblyPart, IFlowNode, IDeltaVPart, IEquatable<IDeltaVPart>, IInteractivePart
- Inheritance
-
ObjectAssemblyPart
- Implements
-
- Extension Methods
-
Constructors
ObjectAssemblyPart()
public ObjectAssemblyPart()
Properties
ActivationStage
public int ActivationStage { get; set; }
Property Value
- int
Assembly
public IObjectAssembly Assembly { get; set; }
Property Value
- IObjectAssembly
AssemblyRelativePosition
public Vector3 AssemblyRelativePosition { get; set; }
Property Value
- Vector3
AssemblyRelativeRotation
public Quaternion AssemblyRelativeRotation { get; set; }
Property Value
- Quaternion
AtmDensity
public double AtmDensity { get; }
Property Value
- double
AtmDensityASL
public double AtmDensityASL { get; }
Property Value
- double
AtmosphericTemperature
public double AtmosphericTemperature { get; }
Property Value
- double
AtmosphericTemperatureASL
public double AtmosphericTemperatureASL { get; }
Property Value
- double
AutomaticSuggestedRotation
public Quaternion AutomaticSuggestedRotation { get; set; }
Property Value
- Quaternion
AvailablePart
public IObjectAssemblyAvailablePart AvailablePart { get; }
Property Value
- IObjectAssemblyAvailablePart
BaseAttachmentRotation
public Quaternion BaseAttachmentRotation { get; set; }
Property Value
- Quaternion
CanAttachToSurfaces
public bool CanAttachToSurfaces { get; }
Property Value
- bool
CanHaveSurfaceAttachedTo
public bool CanHaveSurfaceAttachedTo { get; }
Property Value
- bool
CanStage
public bool CanStage { get; set; }
Property Value
- bool
CanSuggestOrientation
public bool CanSuggestOrientation { get; }
Property Value
- bool
Category
public PartCategories Category { get; }
Property Value
- PartCategories
Children
public List<IObjectAssemblyPart> Children { get; set; }
Property Value
- List<IObjectAssemblyPart>
Colliders
public Collider[] Colliders { get; set; }
Property Value
- Collider[]
Containers
public IResourceContainer[] Containers { get; }
Property Value
- IResourceContainer[]
DecoupleStage
public int DecoupleStage { get; set; }
Property Value
- int
DeltaVChildren
public IEnumerable<IDeltaVPart> DeltaVChildren { get; }
Property Value
- IEnumerable<IDeltaVPart>
DeltaVContainers
public IResourceContainer[] DeltaVContainers { get; }
Property Value
- IResourceContainer[]
DryMass
public double DryMass { get; }
Property Value
- double
FuelCrossFeed
public bool FuelCrossFeed { get; set; }
Property Value
- bool
GlobalId
public IGGuid GlobalId { get; }
Property Value
- IGGuid
GreenMass
public double GreenMass { get; }
Property Value
- double
Guid
public IGGuid Guid { get; }
Property Value
- IGGuid
HighlightColor
public Color HighlightColor { get; set; }
Property Value
- Color
Highlighted
public bool Highlighted { get; set; }
Property Value
- bool
InStageIndex
public int InStageIndex { get; set; }
Property Value
- int
IsActiveInStaging
public bool IsActiveInStaging { get; set; }
Property Value
- bool
IsCompound
public bool IsCompound { get; }
Property Value
- bool
IsFinalized
public bool IsFinalized { get; set; }
Property Value
- bool
IsSymmetryMirrored
public bool IsSymmetryMirrored { get; set; }
Property Value
- bool
MirrorTechnique
public MirrorTechnique MirrorTechnique { get; }
Property Value
- MirrorTechnique
Modules
public DictionaryValueList<Type, IPartModule> Modules { get; }
Property Value
- DictionaryValueList<Type, IPartModule>
MyNodeConnectedToParent
public IObjectAssemblyPartNode MyNodeConnectedToParent { get; }
Property Value
- IObjectAssemblyPartNode
Name
public string Name { get; }
Property Value
- string
Nodes
public List<IObjectAssemblyPartNode> Nodes { get; }
Property Value
- List<IObjectAssemblyPartNode>
OrientationPreference
public OABOrientation OrientationPreference { get; }
Property Value
- OABOrientation
OriginalNodeLocalAttachPosition
public Vector3 OriginalNodeLocalAttachPosition { get; set; }
Property Value
- Vector3
OriginalPart
public IObjectAssemblyPart OriginalPart { get; }
Property Value
- IObjectAssemblyPart
OriginalPartLocalAttachPosition
public Vector3 OriginalPartLocalAttachPosition { get; set; }
Property Value
- Vector3
Parent
public IDeltaVPart Parent { get; }
Property Value
- IDeltaVPart
ParentNodeConnectedToMe
public IObjectAssemblyPartNode ParentNodeConnectedToMe { get; }
Property Value
- IObjectAssemblyPartNode
ParentNodeRelativePosition
public Vector3 ParentNodeRelativePosition { get; set; }
Property Value
- Vector3
ParentNodeRelativeRotation
public Quaternion ParentNodeRelativeRotation { get; set; }
Property Value
- Quaternion
ParentPart
public IObjectAssemblyPart ParentPart { get; }
Property Value
- IObjectAssemblyPart
ParentPartRelativePosition
public Vector3 ParentPartRelativePosition { get; set; }
Property Value
- Vector3
ParentPartRelativeRotation
public Quaternion ParentPartRelativeRotation { get; set; }
Property Value
- Quaternion
PartName
public string PartName { get; }
Property Value
- string
PartSize
public AssemblySizeFilterType PartSize { get; }
Property Value
- AssemblySizeFilterType
public Transform PartTransform { get; }
Property Value
- Transform
PickupPointOffset
public Vector3 PickupPointOffset { get; set; }
Property Value
- Vector3
PickupRotationPointOffset
public Vector3 PickupRotationPointOffset { get; set; }
Property Value
- Vector3
RawPartModules
public List<SerializedPartModule> RawPartModules { get; set; }
Property Value
- List<SerializedPartModule>
ResourceCosts
public PartResourceCostDefinition[] ResourceCosts { get; }
Property Value
- PartResourceCostDefinition[]
ResourceFlowRequestBroker
public ResourceFlowRequestBroker ResourceFlowRequestBroker { get; set; }
Property Value
- ResourceFlowRequestBroker
ResourceMass
public double ResourceMass { get; }
Property Value
- double
Resources
public IObjectAssemblyResource[] Resources { get; }
Property Value
- IObjectAssemblyResource[]
SelectablePartReference
public SelectablePart SelectablePartReference { get; set; }
Property Value
- SelectablePart
StageType
public AssemblyPartStageType StageType { get; }
Property Value
- AssemblyPartStageType
StagingIconAssetAddress
public string StagingIconAssetAddress { get; }
Property Value
- string
StaticPressureAtm
public float StaticPressureAtm { get; }
Property Value
- float
StaticPressureAtmASL
public float StaticPressureAtmASL { get; }
Property Value
- float
SurfaceAttachmentPositionOffset
public Vector3 SurfaceAttachmentPositionOffset { get; }
Property Value
- Vector3
SurfaceAttachmentRotationOffset
public Quaternion SurfaceAttachmentRotationOffset { get; }
Property Value
- Quaternion
SurfaceAttachmentVisualSize
public float SurfaceAttachmentVisualSize { get; }
Property Value
- float
SymmetrySet
public SymmetrySet SymmetrySet { get; set; }
Property Value
- SymmetrySet
TotalMass
public double TotalMass { get; }
Property Value
- double
UniqueId
public IGGuid UniqueId { get; set; }
Property Value
- IGGuid
UserRotationOffset
public Quaternion UserRotationOffset { get; set; }
Property Value
- Quaternion
WetMass
public double WetMass { get; }
Property Value
- double
WorldPosition
public Vector3 WorldPosition { get; set; }
Property Value
- Vector3
WorldRotation
public Quaternion WorldRotation { get; set; }
Property Value
- Quaternion
Methods
AddDynamicNode(IObjectAssemblyPart, IObjectAssemblyAvailablePartNode)
public IObjectAssemblyPartNode AddDynamicNode(IObjectAssemblyPart oabPart, IObjectAssemblyAvailablePartNode dynamicNode)
Parameters
oabPart IObjectAssemblyPart
dynamicNode IObjectAssemblyAvailablePartNode
Returns
- IObjectAssemblyPartNode
ApplyColors(Color, Color)
public void ApplyColors(Color baseColor, Color detailColor)
Parameters
baseColor Color
detailColor Color
CalculateOffsetToGround()
public float CalculateOffsetToGround()
Returns
- float
CreateCone(float, float)
public Mesh CreateCone(float height, float radius)
Parameters
height float
radius float
Returns
- Mesh
CreateTorus()
public Mesh CreateTorus()
Returns
- Mesh
DestroyInteractivePart()
public void DestroyInteractivePart()
Equals(IDeltaVPart)
public bool Equals(IDeltaVPart other)
Parameters
other IDeltaVPart
Returns
- bool
Equals(object)
public override bool Equals(object obj)
Parameters
obj object
Returns
- bool
FinalizeLoad(ObjectAssemblyBuilderEvents, IObjectAssemblyAvailablePart)
public void FinalizeLoad(ObjectAssemblyBuilderEvents events, IObjectAssemblyAvailablePart part)
Parameters
events ObjectAssemblyBuilderEvents
part IObjectAssemblyAvailablePart
FinalizeModules(GameObject, IObjectAssemblyAvailablePart)
public void FinalizeModules(GameObject newObject, IObjectAssemblyAvailablePart availablePart)
Parameters
newObject GameObject
availablePart IObjectAssemblyAvailablePart
FindAttachNodeAttachedPart(string)
public IDeltaVPart FindAttachNodeAttachedPart(string nodeName)
Parameters
nodeName string
Returns
- IDeltaVPart
public IEnumerable<Transform> FindModelTransforms(string transformName)
Parameters
transformName string
Returns
- IEnumerable<Transform>
FindNodeAttachedPart(IGGuid)
public IObjectAssemblyPartNode FindNodeAttachedPart(IGGuid attachedPartID)
Parameters
attachedPartID IGGuid
Returns
- IObjectAssemblyPartNode
FindNodeWithTag(string)
public IObjectAssemblyPartNode FindNodeWithTag(string attachNodeTag)
Parameters
attachNodeTag string
Returns
- IObjectAssemblyPartNode
GetAnchorPart()
public IObjectAssemblyPart GetAnchorPart()
Returns
- IObjectAssemblyPart
GetCategoryName()
public string GetCategoryName()
Returns
- string
GetDisplayName()
public string GetDisplayName()
Returns
- string
GetPartBounds(ref Bounds)
public void GetPartBounds(ref Bounds totalBounds)
Parameters
totalBounds Bounds
HasChildren()
public bool HasChildren()
Returns
- bool
HasModule<T>()
public bool HasModule<T>() where T : PartComponentModule
Returns
- bool
Type Parameters
T
HasParent()
Returns
- bool
Initialize(IObjectAssemblyAvailablePart, ObjectAssemblyAssets)
public void Initialize(IObjectAssemblyAvailablePart availablePart, ObjectAssemblyAssets prefabs)
Parameters
availablePart IObjectAssemblyAvailablePart
prefabs ObjectAssemblyAssets
NotifyNodesOfDisconnect(IObjectAssemblyPart)
public void NotifyNodesOfDisconnect(IObjectAssemblyPart disconnectedPart)
Parameters
disconnectedPart IObjectAssemblyPart
OnContainerChanged(MessageCenterMessage)
public void OnContainerChanged(MessageCenterMessage msg)
Parameters
msg MessageCenterMessage
RemoveChildedPart(IObjectAssemblyPart)
public void RemoveChildedPart(IObjectAssemblyPart child)
Parameters
child IObjectAssemblyPart
RemoveDynamicNode(IObjectAssemblyPartNode)
public bool RemoveDynamicNode(IObjectAssemblyPartNode existingNode)
Parameters
existingNode IObjectAssemblyPartNode
Returns
- bool
SetColliders(Collider[])
public void SetColliders(Collider[] colliders)
Parameters
colliders Collider[]
SetColors(Color, Color)
public void SetColors(Color baseColor, Color detailColor)
Parameters
baseColor Color
detailColor Color
SetNodeLocalPosition(IObjectAssemblyPartNode, Vector3)
public void SetNodeLocalPosition(IObjectAssemblyPartNode node, Vector3 newLocalPosition)
Parameters
node IObjectAssemblyPartNode
newLocalPosition Vector3
SetNodeLocalScale(IObjectAssemblyPartNode, float)
public void SetNodeLocalScale(IObjectAssemblyPartNode node, float newScaleFactor)
Parameters
node IObjectAssemblyPartNode
newScaleFactor float
SetOriginalPart(IObjectAssemblyPart)
public void SetOriginalPart(IObjectAssemblyPart value)
Parameters
value IObjectAssemblyPart
SetParentPart(IObjectAssemblyPart)
public void SetParentPart(IObjectAssemblyPart value)
Parameters
value IObjectAssemblyPart
SetPartColorEndFrame(Color, Color)
public IEnumerator SetPartColorEndFrame(Color baseColor, Color detailColor)
Parameters
baseColor Color
detailColor Color
Returns
- IEnumerator
ShowNodes(bool, bool, bool)
public void ShowNodes(bool show, bool onlyShowAvailable = true, bool showSurfaceNodes = true)
Parameters
show bool
onlyShowAvailable bool
showSurfaceNodes bool
TryGetModule(Type, out PartBehaviourModule)
public bool TryGetModule(Type moduleType, out PartBehaviourModule foundModule)
Parameters
moduleType Type
foundModule PartBehaviourModule
Returns
- bool
TryGetModuleData<T, U>(out U)
public bool TryGetModuleData<T, U>(out U data) where T : PartComponentModule where U : ModuleData
Parameters
data U
Returns
- bool
Type Parameters
T
U
TryGetModuleOfInstanceType(Type, out PartBehaviourModule)
public bool TryGetModuleOfInstanceType(Type moduleType, out PartBehaviourModule foundModule)
Parameters
moduleType Type
foundModule PartBehaviourModule
Returns
- bool
TryGetModuleOfInstanceType<T>(out T)
public bool TryGetModuleOfInstanceType<T>(out T module) where T : PartBehaviourModule
Parameters
module T
Returns
- bool
Type Parameters
T
TryGetModule<T>(out T)
public bool TryGetModule<T>(out T module) where T : PartBehaviourModule
Parameters
module T
Returns
- bool
Type Parameters
T
UpdateMassValues()
public void UpdateMassValues()
public void getChildrenOfPartNotOthers(GameObject current, List<Transform> children)
Parameters
current GameObject
children List<Transform>