class ConstructionBase
ConstructionBase › ConstructionBasic
Constants 7
protected static const int MAX_MATERIAL_PILES = 64safety cap for material pile spawning
static const float REPAIR_MATERIAL_PERCENTAGE = 0.15static const float DECONSTURCT_MATERIAL_LOSS = 0.2static const float DEFAULT_DECAY_RATE = -1.0HP/s change
static const float DEFAULT_DECAY_THRESHOLD = 0.3Percentage of max health where the decay stops
static const float DEFAULT_DECAY_RATE_COEF = 1.0Default decay speed coef
static const float SANDSTORM_DECAY_RATE_COEF = 1.5Sandstorm decay speed coef
Members 10
protected ConstructionDataTypeHolder m_TypeLevelHolderprotected ref map<string, ref ConstructionPart> m_ConstructionPartsprotected ref array<ConstructionPart> m_ConstructionPartArrayINSTANCED construction part data;
Show 11 more
, EEInitConstruction(), GetBaseConstructionPart(), GetConstructionPartArray(), GetConstructionPartsToBuild(), GetConstructionPartsUnableToBuild(), UpdateConstructionParts(), UpdatePhysics(), UpdateVisuals(), Rebuilding.HandleStoreLoad(), Rebuilding.InitBaseStateDeferred(), and Rebuilding.SetAllPartsFromSyncData()protected ref array<ConstructionPart> m_BuiltConstructionPartArraybuilt parts array
protected EntityAI m_EntityParentShow 43 more
, AddToConstructedParts(), CanRepairPart(), ConstructionBase(), ConstructionDirectionCheck(), ConstructionInsiderBoxCheck(), CreateCollisionTrigger(), DestroyMaterialsServer(), DismantlePartServerEx(), DrawDebugCollisionBox(), DrawDebugInsideTestBox(), DropEssentialAttachments(), DropNonUsableMaterialsServer(), EEInitConstruction(), GetCollisionBoxData(), GetItemFallDetectionBoxData(), GetRequiredParts(), HasMaterialWithQuantityAttached(), HideConstructionPart(), HideConstructionPartPhysics(), InitVisuals(), IsColliding(), IsCollidingEx(), ItemFall(), MaterialIsRuined(), ProcessConstructionDecay(), ProcessOnPartBuiltServer(), ProcessOnPartDestroyedServer(), ProcessOnPartDismantledServer(), ReceiveMaterialsServer(), RemoveFromConstructedParts(), SetLockOnAttachedMaterials(), SetParent(), ShowConstructionPart(), ShowConstructionPartPhysics(), TakeMaterialsServer(), UpdateConstructionParts(), UpdateNavmesh(), UpdatePhysics(), UpdateVisuals(), Rebuilding.DestroyPartServer(), Rebuilding.HandleStoreLoad(), Rebuilding.OnConstructionDoorCloseStart(), and Rebuilding.OnConstructionDoorOpenStart()protected bool m_AnyPartBuildableByHandsprotected Shape m_CollisionBoxDIAG_DEVELOPERprotected Shape m_PlayerInsideTestCylinderDIAG_DEVELOPERprotected ref array<Shape> m_InsideTestBoxesDIAG_DEVELOPERShow 2 more
, DestroyDebugInsideTestBoxes(), and DrawDebugInsideTestBox()protected ConstructionBoxTrigger m_ConstructionBoxTriggerDeprecated
Methods 93
override void EEInitConstruction()protected void Cleanup()Show 1 more
, m_InsideTestBoxesprotected void SetParent(EntityAI parent)protected void HandleSyncDataBuild(ConstructionPart part)protected void HandleSyncDataDismantle(ConstructionPart part)protected void HandleSyncDataDestroy(ConstructionPart part)protected bool UpdatePartSyncStateLocal(ConstructionPart part)Returns 'true' if part state was locally changed
void AddToConstructedParts(string part_name)Show 10 more
, Object.GetDebugName(), ConstructionPart.GetPartName(), array.Insert(), LogManager.IsBaseBuildingLogEnable(), EntityAI.IsInitialized(), ConstructionPart.PlayConstructionEffects(), ConstructionPart.SetBuiltState(), ConstructionPart.TryHandleUtilityParts(), m_BuiltConstructionPartArray, and m_EntityParentvoid RemoveFromConstructedParts(string part_name)new build part method
new dismantle part method
void DestroyPartServer(Man player, string part_name, int action_id, bool destroyed_by_connected_part = false)destroy part method
void DestroyConnectedParts(string part_name)Show 3 more
, ExceptionCheck(), GetValidDepenentPartsArray(), and LogManager.IsBaseBuildingLogEnable()void HandleEntityFalling(string partName)when supporting part is removed, entities on top of it should transform to surface Y height
Show 1 more
, GetConstructionPart()protected void ItemFall(string partName)Show 18 more
, dBodyActive(), ErrorEx(), string.Format(), GetBoxCenter(), GetCollisionBoxSize(), GetItemFallDetectionBoxData(), Object.GetOrientation(), IEntity.GetPhysics(), Physics.GetSimulationState(), CGame.IsBoxCollidingGeometryProxy(), Object.ModelToWorld(), EntityAI.OnItemFallRebuilding(), BoxCollidingParams.SetParams(), InventoryItem.ThrowPhysically(), m_EntityParent, BoxCollidingResult.obj, vector.Up, and vector.Zerooverride void ProcessConstructionDecay(float dTime)Handles decay for constructed parts, if enabled
Show 10 more
, DamageSystem.GetDamageZoneFromComponentName(), Object.GetHealth(), Object.GetMaxHealth(), ConstructionPart.GetPartDecayRate(), ConstructionPart.GetPartDecayThreshold(), ConstructionPart.GetPartName(), ConstructionPart.IsBuilt(), Object.SetHealth(), m_ConstructionParts, and m_EntityParentprotected float GetCurrentDecayCoef()Show 2 more
, DEFAULT_DECAY_RATE_COEF, and SANDSTORM_DECAY_RATE_COEFarray<ConstructionPart> GetConstructionPartArray()override bool CanUseHandConstruction()Show 3 more
, ConstructionBasic.OnHealthLevelChanged(), string.ToLower(), and GameConstants.STATE_RUINEDExceptions from 'dependent parts' hierarchy are handled here
Show 11 more
, EntityAI.GetInvulnerabilityTypeString(), HandleSyncDataBuild(), ConstructionPart.IsUtilityPart(), ConstructionPart.OnBeforeBuildServer(), ConstructionPart.OnBuiltServer(), EntityAI.ProcessInvulnerabilityCheck(), Object.SetAllowDamage(), Object.SetHealthMax(), EntityAI.SetSynchDirty(), UpdatePartSyncStateLocal(), and m_EntityParentvoid ProcessOnPartDestroyedServer(Man player, string part_name, int action_id, bool destroyed_by_connected_part = false)void InitVisuals()init ConstructionPart visuals
Show 2 more
, UpdateVisuals(), and m_EntityParentvoid UpdateSpecificPartVisuals(ConstructionPart part)update SPECIFIC ConstructionPart visuals
Show 1 more
, ShowConstructionPart()void UpdateVisuals()update ALL ConstructionPart visuals. Use only if the update queue system won't cut it.
Show 1 more
, StaticFlagPole.FullyBuild()void UpdateSpecificPartPhysics(ConstructionPart part)update SPECIFIC part's physics
Show 1 more
, ShowConstructionPartPhysics()void UpdatePhysics()update ALL parts physics. Sets hide first, then shows the rest. Use only if the update queue system won't cut it.
protected void UpdateConstructionParts()Parse type data and create part instance data objects
Show 20 more
, map.Clear(), CreatePartInstanceObject(), ConstructionPart.GetBuildIndicationTypeMask(), EntityAIType.GetConstructionDataHolderBasic(), ConstructionDataTypeHolder.GetConstructionPartTypeDataArray(), ConstructionPartTypeData.GetCustomInstanceType(), GetDefaultPartInstanceTypename(), Object.GetEntityType(), ConstructionPartTypeData.GetPartName(), ConstructionPart.InitAdditionalPartInstanceInfo(), array.Insert(), map.Insert(), new PartInstanceInitData(), ConstructionPart.SetPartTypeData(), m_AnyPartBuildableByHands, m_BuiltConstructionPartArray, m_ConstructionPartArray, m_ConstructionParts, m_EntityParent, and PartInstanceInitData.m_ParentEntprotected ConstructionPart CreatePartInstanceObject(typename partTypename)protected typename GetDefaultPartInstanceTypename()Override on lower implements to create desired part types
protected void QueueFullUpdateParts(array<ConstructionPart> changedParts)map<string, ref ConstructionPart> GetConstructionParts()ConstructionPart GetConstructionPart(string part_name)Show 47 more
, ActionDestroyPartInstantDebug.ActionCondition(), ActionDismantlePartInstantDebug.ActionCondition(), BaseBuildingBase.OnPartBuiltServer(), BaseBuildingBase.OnPartDestroyedServer(), BaseBuildingBase.OnPartDismantledServer(), Construction.ExceptionCheck(), AddToConstructedParts(), CanDismantlePart(), CanRepairPart(), CanUseToolToBuildPart(), CanUseToolToDismantlePart(), DestroyMaterialsServer(), DropEssentialAttachments(), DropNonUsableMaterialsServer(), GetCollisionBoxData(), GetConstructionPartToDestroy(), GetConstructionPartToDismantle(), GetItemFallDetectionBoxData(), GetMaterialType(), HandleEntityFalling(), HasConflictPart(), HasMaterialsEx(), IsColliding(), IsCollidingEx(), IsPartConstructed(), MaterialIsRuined(), OnHealthLevelChanged(), ProcessOnPartBuiltServer(), ProcessOnPartDestroyedServer(), ProcessOnPartDismantledServer(), ReceiveMaterialsServer(), RemoveFromConstructedParts(), SetLockOnAttachedMaterials(), TakeMaterialsServer(), ConstructionPartRebuild.TryHandleUtilityParts(), ConstructionPartRebuildRubble.RubbleRemovalCheck(), DigitalCodeLock.SetDoorInfoFromSlot(), Fence.CheckGateState(), Fence.GateAttachmentConditions(), Fence.GateAttachmentsSanityCheck(), Fence.OnPartDestroyedServer(), Fence.OnPartDismantledServer(), Rebuilding.CanDisplayAttachmentCategoryConstruction(), Rebuilding.GetRebuildingPart(), ShelterSite.OnPartBuiltServer(), StaticFlagPole.FullyBuild(), and TerritoryFlag.OnPartDismantledServer()bool CanBuildPartEx(string partName, ItemBase tool, out EConstructionInfoCategories failureReasonsMask)not meant to replace, but rather extend the functionality for specific use
Show 4 more
, HasRequiredPart(), IsPartConstructed(), MaterialIsRuined(), and PartHasAnySupportFulfilled()Simplified condition for utility (non-)parts
Show 1 more
, PartHasAnySupportFulfilled()void GetConstructionPartsToBuild(string main_part_name, out array<ConstructionPart> construction_parts, ItemBase tool, out string real_constructionTarget, bool use_tool)Show 3 more
, ConstructionPart.GetPartName(), array.Insert(), and m_ConstructionPartArrayvoid GetConstructionPartsUnableToBuild(string actionComponentName, out array<ConstructionPart> constructionParts, ItemBase tool, out string realConstructionTarget, bool useTool)Show 3 more
, ConstructionPart.GetPartName(), array.Insert(), and m_ConstructionPartArrayConstructionPart GetBaseConstructionPart()checks if construction part has all the required parts built
Show 1 more
, m_ConstructionPartsShow 1 more
, RebuildingSpawner.RebuildAllWoodenPartsFiltered()checks if construction part has all the required support
ConstructionPart GetConstructionPartToDismantle(string part_name, ItemBase tool)Show 10 more
, GetConstructionPart(), HasDependentPart(), IsPartConstructed(), ConstructionDebug.ResetDismantlePartData(), ConstructionDebug.SetCanDismantlePartData(), SupportRemovalCheck(), ConstructionDismantleDebugData.constructed, ConstructionDismantleDebugData.hasDependents, ConstructionDismantleDebugData.partName, and ConstructionDismantleDebugData.supportStatechecks if construction part has dependent part (that is already built) because of which it cannot be dismantled
Show 1 more
, m_BuiltConstructionPartArrayChecks if all supports would hold on part removal. Returns 'false' if some would fail
bool CanRepairPart(string partName, ItemBase tool = null, PlayerBase player = null, bool facingCheck = false)Show 13 more
, PlayerBase.GetConstructionActionData(), GetConstructionPart(), DamageSystem.GetDamageZoneFromComponentName(), Object.GetHealthLevel(), Human.GetInputController(), HasMaterials(), CGame.IsDedicatedServer(), EntityAI.IsFacingCamera(), EntityAI.IsFacingPlayerEx(), ConstructionActionData.SetTargetPart(), m_EntityParent, GameConstants.STATE_PRISTINE, and GameConstants.STATE_RUINEDbool ConstructionInsiderBoxCheck(PlayerBase player, ConstructionPart part)Check character positioning with a box check (character must be inside at least one of the defined boxes)
Show 15 more
, DestroyDebugInsideTestBoxes(), Debug.DrawCylinder(), DrawDebugInsideTestBox(), DiagMenu.GetBool(), ConstructionPart.GetInsiderBoxData(), ConstructionPart.GetPartName(), Object.GetPosition(), IEntity.GetTransform(), Math3D.IntersectCylinderOBB(), Math3D.MatrixIdentity4(), ConstructionDebug.SetInsideboxCheckDebugData(), Shape.SetMatrix(), m_EntityParent, m_InsideTestBoxes, and m_PlayerInsideTestCylinderbool ConstructionDirectionCheck(PlayerBase player, ConstructionPart part, EConstructionDirCheckType type)Show 2 more
, MiscGameplayFunctions.MemPointDirectionalCheck(), and m_EntityParentConstructionPart GetConstructionPartToDestroy(string part_name)protected void ShowConstructionPart(string part_name)Animates AnimationSource. Use on server only, AUTO-SYNCED
protected void HideConstructionPart(string part_name)Animates AnimationSource. Use on server only, AUTO-SYNCED
void ShowConstructionPartPhysics(string part_name)sets physics LOCALLY
void HideConstructionPartPhysics(string part_name)sets physics LOCALLY
returns true if part constructed
Show 15 more
, CanBuildUtilityPart(), CanDestroyPart(), CanDismantlePart(), HasConflictPart(), HasRequiredPart(), OnHealthLevelChanged(), Land_WaterWell_Brick.GetLiquidSourceType(), Land_WaterWell_Brick.GetWaterSourceObjectType(), Rebuilding.HasRequiredPart(), TerritoryFlag.CanDisplayAttachmentCategory(), TerritoryFlag.CanReceiveAttachment(), Watchtower.CanDisplayAttachmentCategory(), Watchtower.CanDisplayAttachmentSlot(), Watchtower.CheckSlotVerticalDistance(), and Watchtower.UpdateVisuals()bool HasMaterialsEx(string part_name, bool repairing = false, out string slotName = "", out float requiredQuantity = 0.0)returns true if materials to build the part are available
Show 11 more
, GetConstructionPart(), ConstructionActionData.GetFastConstructionMode(), ConstructionPart.GetMaterialsData(), CGame.GetPlayer(), HasMaterialWithQuantityAttached(), CGame.IsClient(), CGame.IsMultiplayer(), Math.Max(), ConstructionMaterialData.m_MaterialQuantity, ConstructionMaterialData.m_MaterialSlotName, and REPAIR_MATERIAL_PERCENTAGEShow 1 more
, m_EntityParentShow 17 more
, Math.Floor(), GetConstructionPart(), GameInventory.GetCurrentInventoryLocation(), EntityAI.GetInventory(), EntityAI.GetInventory(), ConstructionPart.GetMaterialsData(), InventoryLocation.GetSlot(), new InventoryLocation(), Math.Max(), CGame.ObjectDelete(), GameInventory.SetSlotLock(), m_EntityParent, ConstructionMaterialData.m_MaterialLockable, ConstructionMaterialData.m_MaterialQuantity, ConstructionMaterialData.m_MaterialSlotName, ConstructionMaterialData.m_SkipOnRepair, and REPAIR_MATERIAL_PERCENTAGEShow 14 more
, GetConstructionPart(), GameInventory.GetCurrentInventoryLocation(), Object.GetDebugName(), EntityAI.GetInventory(), EntityAI.GetInventory(), ConstructionPart.GetMaterialsData(), InventoryLocation.GetSlot(), new InventoryLocation(), LogManager.IsBaseBuildingLogEnable(), CGame.ObjectDelete(), GameInventory.SetSlotLock(), m_EntityParent, ConstructionMaterialData.m_MaterialLockable, and ConstructionMaterialData.m_MaterialSlotNameShow 22 more
, GameInventory.FindAttachment(), string.Format(), GetConstructionPart(), GameInventory.GetCurrentInventoryLocation(), Object.GetDebugName(), EntityAI.GetInventory(), EntityAI.GetInventory(), ConstructionPart.GetMaterialsData(), new InventoryLocation(), ConstructionPart.IsBase(), LogManager.IsBaseBuildingLogEnable(), MoveMaterialAttachmentToGround(), CGame.ObjectDelete(), GameInventory.SetSlotLock(), InventorySlots.INVALID, m_EntityParent, ConstructionMaterialData.m_MaterialLockable, ConstructionMaterialData.m_MaterialQuantity, ConstructionMaterialData.m_MaterialSlotID, ConstructionMaterialData.m_MaterialSlotName, ConstructionMaterialData.m_MaterialType, and ConstructionMaterialData.m_SkipOnDismantleprotected void MoveMaterialAttachmentToGround(notnull EntityAI parent, Man player, notnull ItemBase attachment, notnull InventoryLocation invloc, string partName)The method does not care about the amount of materials that should be returned based on the cached quantity in the ConstructionMaterialData struct. If we start using this method for e.g. drop of materials that are not attached and locked to the construction parent then we need to change the method to handle the quantity accordingly
Show 20 more
, CGame.CreateObjectEx(), EntityAI.Delete(), ErrorEx(), string.Format(), Object.GetHealth(), Object.GetMemoryPointPos(), Object.GetPosition(), Object.GetPosition(), ItemBase.GetQuantity(), ItemBase.GetTargetQuantityMax(), Object.GetType(), Object.MemoryPointExists(), CGame.ObjectModelToWorld(), Object.PlaceOnSurface(), Object.SetHealth(), ItemBase.SetQuantity(), Math.Sin(), Vector(), Math.DEG2RAD, and MAX_MATERIAL_PILESDrop other, non-material attachments tied to the construction part
Show 14 more
, GetConstructionPart(), ConstructionPart.GetEssentialAttachmentSlots(), EntityAI.GetInventory(), Object.GetMemoryPointPos(), Object.GetPosition(), Object.GetPosition(), InventorySlots.GetSlotIdFromString(), ConstructionPart.HasEssentialAttachmentSlots(), CGame.IsMultiplayer(), Math3D.MatrixIdentity4(), Object.MemoryPointExists(), Object.ModelToWorld(), GameInventory.SetSlotLock(), and m_EntityParentShow 13 more
, GetConstructionPart(), GameInventory.GetCurrentInventoryLocation(), Object.GetDebugName(), EntityAI.GetInventory(), EntityAI.GetInventory(), ConstructionPart.GetMaterialsData(), InventoryLocation.GetSlot(), new InventoryLocation(), LogManager.IsBaseBuildingLogEnable(), GameInventory.SetSlotLock(), m_EntityParent, ConstructionMaterialData.m_MaterialLockable, and ConstructionMaterialData.m_MaterialSlotNameShow 2 more
, ConstructionPart.GetDismantleActionTypeMask(), and Object.GetType()ConstructionMaterialType GetMaterialType(string part_name)bool IsCollidingEx(CollisionCheckData check_data)Collision check for building part
Show 29 more
, array.Count(), array.Count(), DestroyDebugCollisionBox(), DrawDebugCollisionBox(), array.Get(), DiagMenu.GetBool(), GetBoxCenter(), GetCollisionBoxData(), GetCollisionBoxSize(), ConstructionPart.GetCollisionData(), GetConstructionPart(), CfgGameplayHandler.GetDisableIsCollidingCheck(), Object.GetOrientation(), Object.GetType(), array.Insert(), array.Insert(), array.InsertAll(), CGame.IsBoxCollidingGeometry(), EntityAI.IsIgnoredByConstruction(), Object.ModelToWorld(), ConstructionDebug.ResetCollisionPrintoutData(), ConstructionDebug.SetCollisionPrintoutData(), Vector(), CollisionCheckData.m_AdditionalExcludes, m_CollisionBox, m_EntityParent, CollisionCheckData.m_PartName, CollisionCheckData.m_PrimaryGeometry, and CollisionCheckData.m_SecondaryGeometryShow 1 more
, ItemFall()protected void DrawDebugCollisionBox(vector min_max[2], int color)DIAG_DEVELOPERShow 3 more
, Shape.SetMatrix(), m_CollisionBox, and m_EntityParentprotected void DestroyDebugCollisionBox()DIAG_DEVELOPERprotected void DrawDebugInsideTestBox(vector min, vector max, int color)DIAG_DEVELOPERShow 3 more
, Shape.SetMatrix(), m_EntityParent, and m_InsideTestBoxesprotected void DestroyDebugInsideTestBoxes()DIAG_DEVELOPERShow 14 more
, array.Get(), GetBoxCenter(), GetCollisionBoxData(), GetCollisionBoxSize(), ConstructionPart.GetCollisionData(), GetConstructionPart(), CfgGameplayHandler.GetDisableIsCollidingCheck(), Object.GetOrientation(), array.Insert(), CGame.IsBoxCollidingGeometry(), EntityAI.IsIgnoredByConstruction(), Object.ModelToWorld(), Vector(), and m_EntityParentvoid DestroyCollisionTrigger()bool IsTriggerColliding()