class ConstructionPart
- ConstructionPart
Instanced construction part data classes for dynamic data, statics now stored on EntityType level in ConstructionPartTypeData
Constants 2
static const int BITWISE_SYNCINFO_SIZE_BASE = 2no. of bits to store synced info, per part. System not ready for variable size parts yet.
protected const int ANIMATION_EFFECT_DELAY_BUILD = 350ms
Members 11
protected ConstructionPartTypeData m_PartTypeDataEntity-type object storing non-instanced data
protected int m_LocalSyncBitMask = 0bool m_IsBuiltdefines part build state
protected ref TConstructionPartInsiderBoxData m_InsiderBoxDataGrouped modelspace positions of min/max insidebox points
string m_Namestring m_PartNamestring m_MainPartNameint m_Idbool m_IsBasebool m_IsGateobsolete, stored on 'ConstructionPartTypeData'
Methods 80
void InitAdditionalPartInstanceInfo(PartInstanceInitData initData)intended to fill in additional INSTANCE info AFTER basic info is filled (which is tied to constructor parameters from ye olden times). Override as needed.
void PartInstanceDeferredInit(EntityAI parent)Init stuff reliant on entity position or other stuff that can't be done in constructor
protected void InitInsiderBoxData(EntityAI parent)'inside' box data to help determine whether the character is inside. Modelspace.
int GetSyncDataSize()Not ready for overrides yet. All in good time.
default behavior for simple parts
default behavior for simple parts
default behavior for simple parts
Translates the bitmask value from the main syncVariable into simple int format of 'GetSyncDataSize' size (currently 2 bits)
void StoreLocalSyncBitMask(int bitmask)int GetLocalSyncBitMask()bool IsBuilt()Show 20 more
, BaseBuildingBase.HandleFallingForConstructedParts(), BaseBuildingBase.SetPartFromSyncData(), BaseBuildingBase.SetPartsAfterStoreLoad(), Construction.ExceptionCheck(), ConstructionBase.GetValidDepenentPartsArray(), ConstructionBase.IsPartConstructed(), ConstructionBase.ProcessConstructionDecay(), ConstructionBase.UpdatePhysics(), ConstructionBase.UpdateSpecificPartPhysics(), ConstructionBase.UpdateSpecificPartVisuals(), ConstructionBase.UpdateUtilityParts(), ConstructionBase.UpdateVisuals(), ConstructionPartRebuildRubble.RubbleRemovalCheck(), Fence.AfterStoreLoad(), Fence.CheckGateState(), Fence.GateAttachmentConditions(), Fence.GateAttachmentsSanityCheck(), Rebuilding.CanDisplayAttachmentCategoryConstruction(), Rebuilding.SetPartStateLocal(), and TerritoryFlag.CanReceiveAttachment()bool IsLocalSyncBuilt()'true' if synced as built already
TConstructionPartInsiderBoxData GetInsiderBoxData()translated MODELSPACE positions of min/max memory points (should be single points in memory LOD)
bool CanBeRepaired(int zoneHealthLevel, ItemBase tool = null, PlayerBase player = null)protected int GetMaxRepairLevel(ItemBase tool = null, PlayerBase player = null)health state from 'GetHealthLevel', not the actual health float value!
string GetName()Show 11 more
, ActionBuildShelter.DetermineConstructionSounds(), ActionBuildShelter.GetText(), ActionBuildShelter.OnActionInfoUpdate(), ActionConstructionPartInfoContinuous.OnActionInfoUpdate(), ActionDestroyPart.OnActionInfoUpdate(), ActionDestroyPartInstantDebug.OnActionInfoUpdate(), ActionDismantlePart.GetAdminLogMessage(), ActionDismantlePart.OnActionInfoUpdate(), ActionDismantlePartInstantDebug.OnActionInfoUpdate(), ActionRepairPart.GetText(), and ActionRepairPart.OnActionInfoUpdate()string GetPartName()string GetMainPartName()int GetId()Show 9 more
, BaseBuildingBase.OnPartDismantledServer(), BaseBuildingBase.SetPartFromSyncData(), Rebuilding.GetPartLocalSyncBitMaskValue(), Rebuilding.HandleSyncDataBuild(), Rebuilding.HandleSyncDataDestroy(), Rebuilding.HandleSyncDataDismantle(), Rebuilding.UpdatePartSyncStateLocal(), StaticFlagPole.FullyBuild(), and TerritoryFlag.CanReceiveAttachment()bool DamageToolOnBuild()bool DamageHandsOnBuild()bool DamageToolOnDeconstruct()bool DamageHandsOnDeconstruct()bool IsUtilityPart()Show 8 more
, ConstructionBase.ProcessOnPartBuiltServer(), ConstructionBase.UpdateUtilityParts(), Rebuilding.AddSupportRequirementFromSourcePart(), Rebuilding.GetValidDepenentPartsArray(), Rebuilding.HasDependentPart(), Rebuilding.RemoveSupportRequirementFromSourcePart(), Rebuilding.UpdatePartSyncStateLocal(), and RebuildingSpawner.RebuildAllWoodenPartsFiltered()bool CanPartDecay()float GetPartDecayRate()float GetPartDecayThreshold()int GetHandBuildFBAnimOverride()bool CanSimulateItemFalling()bool HasEssentialAttachmentSlots()bool HasRelatedGUICategories()bool IsBase()bool IsGate()strings of min/max selections (should be single points in memory LOD)
strings of min/max selections (should be single points in memory LOD)
string GetBuildTextOverride()string GetDismantleTextOverride()int GetMaterialType()rough material type, used for effect playback
int GetBuildActionTypeMask()int GetBuildIndicationTypeMask()int GetDismantleActionTypeMask()array<ref ConstructionMaterialData> GetMaterialsData()bool IsReversible()bool IsReversedLocal()TConstructionPartVariantArray GetRequiredPartsVariants()ConstructionPartStaticsSupportData GetPartStaticsSupportData()bool InvertSupportBehavior()Inverts reaction to support fullfilment
void SetBuiltState(bool is_built)Show 1 more
, m_IsBuiltvoid SetPartTypeData(ConstructionPartTypeData ptd)void PlayConstructionEffects(EntityAI parent)Plays sound of current construction state on parent; BaseBuildingBase uses its own class events for this..
Plays particle of current construction state on parent; BaseBuildingBase uses its own class events for this..
void HandleShowConstructionPart(EntityAI parent)void HandleHideConstructionPart(EntityAI parent)void HandleAddPhysics(EntityAI parent)void HandleRemovePhysics(EntityAI parent)protected void CloseDoorOnPartUnbuild(EntityAI parent)Override-friendly
Sealed on purpose
Sealed on purpose
void TryQueueUtilityPartsUpdate(ConstructionBase con)void SetRequestBuiltState(bool req_built)