Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
construction.c File Reference

Go to the source code of this file.

Data Structures

class  StaticConstructionMethods
 
class  ConstructionBoxTrigger
 

Enumerations

enum  ConstructionMaterialType {
  MATERIAL_NONE = 0, MATERIAL_LOG = 1, MATERIAL_WOOD = 2, MATERIAL_STAIRS = 3,
  MATERIAL_METAL = 4, MATERIAL_WIRE = 5
}
 

Functions

void Construction (BaseBuildingBase parent)
 
void Init ()
 Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system) More...
 
protected BaseBuildingBase GetParent ()
 Get parent of the Effect. More...
 
protected void SetParent (BaseBuildingBase parent)
 
void AddToConstructedParts (string part_name)
 
void RemoveFromConstructedParts (string part_name)
 
void BuildPartServer (notnull Man player, string part_name, int action_id)
 
void DismantlePartServer (notnull Man player, string part_name, int action_id)
 
void DestroyPartServer (Man player, string part_name, int action_id, bool destroyed_by_connected_part=false)
 
void DestroyConnectedParts (string part_name)
 
bool ExceptionCheck (string part_name)
 Exceptions from 'dependent parts' hierarchy are handled here. More...
 
void InitVisuals ()
 
void UpdateVisuals ()
 
void UpdatePhysics ()
 
void InitBaseState ()
 
protected void UpdateConstructionParts ()
 
map< string, ref ConstructionPartGetConstructionParts ()
 
ConstructionPart GetConstructionPart (string part_name)
 
bool CanBuildPart (string part_name, ItemBase tool, bool use_tool)
 
bool MaterialIsRuined (string part_name)
 
void GetConstructionPartsToBuild (string main_part_name, out array< ConstructionPart > construction_parts, ItemBase tool, out string real_constructionTarget, bool use_tool)
 
ConstructionPart GetBaseConstructionPart ()
 
ConstructionPart GetGateConstructionPart ()
 
protected bool HasRequiredPart (string part_name)
 
protected bool HasConflictPart (string part_name)
 
ConstructionPart GetConstructionPartToDismantle (string part_name, ItemBase tool)
 
bool CanDismantlePart (string part_name, ItemBase tool)
 
bool HasDependentPart (string part_name)
 
protected array< stringGetValidDepenentPartsArray (string part_name, array< string > recurs=null)
 
array< stringGetRequiredParts (string part_name, string main_part_name)
 
ConstructionPart GetConstructionPartToDestroy (string part_name)
 
bool CanDestroyPart (string part_name)
 
protected void ShowConstructionPart (string part_name)
 
protected void HideConstructionPart (string part_name)
 
void ShowConstructionPartPhysics (string part_name)
 
void HideConstructionPartPhysics (string part_name)
 
bool IsPartConstructed (string part_name)
 
bool HasMaterials (string part_name, bool repairing=false)
 
protected bool HasMaterialWithQuantityAttached (string slot_name, float quantity)
 
void TakeMaterialsServer (string part_name, bool repairing=false)
 
protected void ReceiveMaterialsServer (notnull Man player, string part_name, string damagezone_name)
 
protected void DestroyMaterialsServer (Man player, string part_name)
 
void DropNonUsableMaterialsServer (Man player, string part_name)
 
void SetLockOnAttachedMaterials (string part_name, bool lock_slot)
 
bool CanUseToolToBuildPart (string part_name, ItemBase tool)
 
bool CanUseToolToDismantlePart (string part_name, ItemBase tool)
 
ConstructionMaterialType GetMaterialType (string part_name)
 
bool IsColliding (string part_name)
 
bool IsCollidingEx (CollisionCheckData check_data)
 Collision check for building part. More...
 
vector GetCollisionBoxSize (vector min_max[2])
 
protected void GetCollisionBoxData (string part_name, out vector min_max[2])
 
vector GetBoxCenter (vector min_max[2])
 
void GetTriggerExtents (vector min_max[2], out vector extents[2])
 
protected void DrawDebugCollisionBox (vector min_max[2], int color)
 
protected void DestroyDebugCollisionBox ()
 
void CreateCollisionTrigger (string part_name, vector min_max[2], vector center)
 
void DestroyCollisionTrigger ()
 
bool IsTriggerColliding ()
 
void CollisionCheckData ()
 

Variables

enum ConstructionMaterialType REPAIR_MATERIAL_PERCENTAGE = 0.15
 
protected ref map< string, ref ConstructionPartm_ConstructionParts
 
protected BaseBuildingBase m_Parent
 
protected Shape m_CollisionBox
 
protected ConstructionBoxTrigger m_ConstructionBoxTrigger
 
class StaticConstructionMethods m_AdditionalExcludes
 Data structure for passing parameters (extendable, modable) More...
 
string m_PartName
 
int m_PrimaryGeometry
 
int m_SecondaryGeometry
 

Enumeration Type Documentation

◆ ConstructionMaterialType

Enumerator
MATERIAL_NONE 
MATERIAL_LOG 
MATERIAL_WOOD 
MATERIAL_STAIRS 
MATERIAL_METAL 
MATERIAL_WIRE 

Definition at line 1 of file construction.c.

Function Documentation

◆ AddToConstructedParts()

void AddToConstructedParts ( string  part_name)

Definition at line 52 of file construction.c.

◆ BuildPartServer()

void BuildPartServer ( notnull Man  player,
string  part_name,
int  action_id 
)

Definition at line 75 of file construction.c.

◆ CanBuildPart()

bool CanBuildPart ( string  part_name,
ItemBase  tool,
bool  use_tool 
)

Definition at line 294 of file construction.c.

◆ CanDestroyPart()

bool CanDestroyPart ( string  part_name)

Definition at line 565 of file construction.c.

◆ CanDismantlePart()

bool CanDismantlePart ( string  part_name,
ItemBase  tool 
)

Definition at line 466 of file construction.c.

◆ CanUseToolToBuildPart()

bool CanUseToolToBuildPart ( string  part_name,
ItemBase  tool 
)

Definition at line 949 of file construction.c.

◆ CanUseToolToDismantlePart()

bool CanUseToolToDismantlePart ( string  part_name,
ItemBase  tool 
)

Definition at line 972 of file construction.c.

◆ CollisionCheckData()

void CollisionCheckData ( )

Definition at line 1310 of file construction.c.

◆ Construction()

void Construction ( BaseBuildingBase  parent)

Definition at line 26 of file construction.c.

◆ CreateCollisionTrigger()

void CreateCollisionTrigger ( string  part_name,
vector  min_max[2],
vector  center 
)

Definition at line 1180 of file construction.c.

◆ DestroyCollisionTrigger()

void DestroyCollisionTrigger ( )

Definition at line 1208 of file construction.c.

◆ DestroyConnectedParts()

void DestroyConnectedParts ( string  part_name)

Definition at line 141 of file construction.c.

◆ DestroyDebugCollisionBox()

protected void DestroyDebugCollisionBox ( )

Definition at line 1171 of file construction.c.

◆ DestroyMaterialsServer()

protected void DestroyMaterialsServer ( Man  player,
string  part_name 
)

Definition at line 739 of file construction.c.

◆ DestroyPartServer()

void DestroyPartServer ( Man  player,
string  part_name,
int  action_id,
bool  destroyed_by_connected_part = false 
)

Definition at line 121 of file construction.c.

◆ DismantlePartServer()

void DismantlePartServer ( notnull Man  player,
string  part_name,
int  action_id 
)

Definition at line 98 of file construction.c.

◆ DrawDebugCollisionBox()

protected void DrawDebugCollisionBox ( vector  min_max[2],
int  color 
)

Definition at line 1160 of file construction.c.

◆ DropNonUsableMaterialsServer()

void DropNonUsableMaterialsServer ( Man  player,
string  part_name 
)

Definition at line 787 of file construction.c.

◆ ExceptionCheck()

bool ExceptionCheck ( string  part_name)

Exceptions from 'dependent parts' hierarchy are handled here.

Definition at line 157 of file construction.c.

◆ GetBaseConstructionPart()

ConstructionPart GetBaseConstructionPart ( )

Definition at line 376 of file construction.c.

◆ GetBoxCenter()

vector GetBoxCenter ( vector  min_max[2])

Definition at line 1136 of file construction.c.

◆ GetCollisionBoxData()

protected void GetCollisionBoxData ( string  part_name,
out vector  min_max[2] 
)

Definition at line 1115 of file construction.c.

◆ GetCollisionBoxSize()

vector GetCollisionBoxSize ( vector  min_max[2])

Definition at line 1103 of file construction.c.

◆ GetConstructionPart()

ConstructionPart GetConstructionPart ( string  part_name)

Definition at line 278 of file construction.c.

◆ GetConstructionParts()

map<string, ref ConstructionPart> GetConstructionParts ( )

Definition at line 273 of file construction.c.

◆ GetConstructionPartsToBuild()

void GetConstructionPartsToBuild ( string  main_part_name,
out array< ConstructionPart construction_parts,
ItemBase  tool,
out string  real_constructionTarget,
bool  use_tool 
)

Definition at line 337 of file construction.c.

◆ GetConstructionPartToDestroy()

ConstructionPart GetConstructionPartToDestroy ( string  part_name)

Definition at line 555 of file construction.c.

◆ GetConstructionPartToDismantle()

ConstructionPart GetConstructionPartToDismantle ( string  part_name,
ItemBase  tool 
)

Definition at line 456 of file construction.c.

◆ GetGateConstructionPart()

ConstructionPart GetGateConstructionPart ( )

Definition at line 393 of file construction.c.

◆ GetMaterialType()

ConstructionMaterialType GetMaterialType ( string  part_name)

Definition at line 995 of file construction.c.

◆ GetRequiredParts()

array<string> GetRequiredParts ( string  part_name,
string  main_part_name 
)

Definition at line 545 of file construction.c.

◆ GetTriggerExtents()

void GetTriggerExtents ( vector  min_max[2],
out vector  extents[2] 
)

Definition at line 1148 of file construction.c.

◆ GetValidDepenentPartsArray()

protected array<string> GetValidDepenentPartsArray ( string  part_name,
array< string recurs = null 
)

Definition at line 498 of file construction.c.

◆ HasConflictPart()

protected bool HasConflictPart ( string  part_name)

Definition at line 436 of file construction.c.

◆ HasDependentPart()

bool HasDependentPart ( string  part_name)

Definition at line 478 of file construction.c.

◆ HasMaterials()

bool HasMaterials ( string  part_name,
bool  repairing = false 
)

Definition at line 616 of file construction.c.

◆ HasMaterialWithQuantityAttached()

protected bool HasMaterialWithQuantityAttached ( string  slot_name,
float  quantity 
)

Definition at line 657 of file construction.c.

◆ HasRequiredPart()

protected bool HasRequiredPart ( string  part_name)

Definition at line 410 of file construction.c.

◆ HideConstructionPart()

protected void HideConstructionPart ( string  part_name)

Definition at line 583 of file construction.c.

◆ HideConstructionPartPhysics()

void HideConstructionPartPhysics ( string  part_name)

Definition at line 595 of file construction.c.

◆ Init()

void Init ( )

Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)

Definition at line 34 of file construction.c.

◆ InitBaseState()

void InitBaseState ( )

Definition at line 228 of file construction.c.

◆ InitVisuals()

void InitVisuals ( )

Definition at line 173 of file construction.c.

◆ IsColliding()

bool IsColliding ( string  part_name)

Definition at line 1011 of file construction.c.

◆ IsCollidingEx()

bool IsCollidingEx ( CollisionCheckData  check_data)

Collision check for building part.

Definition at line 1060 of file construction.c.

◆ IsPartConstructed()

bool IsPartConstructed ( string  part_name)

Definition at line 601 of file construction.c.

◆ IsTriggerColliding()

bool IsTriggerColliding ( )

Definition at line 1214 of file construction.c.

◆ MaterialIsRuined()

bool MaterialIsRuined ( string  part_name)

Definition at line 304 of file construction.c.

◆ ReceiveMaterialsServer()

protected void ReceiveMaterialsServer ( notnull Man  player,
string  part_name,
string  damagezone_name 
)

Definition at line 725 of file construction.c.

◆ RemoveFromConstructedParts()

void RemoveFromConstructedParts ( string  part_name)

Definition at line 63 of file construction.c.

◆ SetLockOnAttachedMaterials()

void SetLockOnAttachedMaterials ( string  part_name,
bool  lock_slot 
)

Definition at line 901 of file construction.c.

◆ SetParent()

protected void SetParent ( BaseBuildingBase  parent)

Definition at line 44 of file construction.c.

◆ ShowConstructionPart()

protected void ShowConstructionPart ( string  part_name)

Definition at line 577 of file construction.c.

◆ ShowConstructionPartPhysics()

void ShowConstructionPartPhysics ( string  part_name)

Definition at line 590 of file construction.c.

◆ TakeMaterialsServer()

void TakeMaterialsServer ( string  part_name,
bool  repairing = false 
)

Definition at line 670 of file construction.c.

◆ UpdateConstructionParts()

protected void UpdateConstructionParts ( )

Definition at line 235 of file construction.c.

◆ UpdatePhysics()

void UpdatePhysics ( )

Definition at line 207 of file construction.c.

◆ UpdateVisuals()

void UpdateVisuals ( )

Definition at line 188 of file construction.c.

Variable Documentation

◆ m_AdditionalExcludes

class StaticConstructionMethods m_AdditionalExcludes

Data structure for passing parameters (extendable, modable)

◆ m_CollisionBox

protected Shape m_CollisionBox

Definition at line 19 of file construction.c.

◆ m_ConstructionBoxTrigger

protected ConstructionBoxTrigger m_ConstructionBoxTrigger

Definition at line 21 of file construction.c.

◆ m_ConstructionParts

protected ref map<string, ref ConstructionPart> m_ConstructionParts

Definition at line 15 of file construction.c.

◆ m_Parent

protected BaseBuildingBase m_Parent

Definition at line 16 of file construction.c.

◆ m_PartName

string m_PartName

Definition at line 1306 of file construction.c.

◆ m_PrimaryGeometry

int m_PrimaryGeometry

Definition at line 1307 of file construction.c.

◆ m_SecondaryGeometry

int m_SecondaryGeometry

Definition at line 1308 of file construction.c.

◆ REPAIR_MATERIAL_PERCENTAGE

enum ConstructionMaterialType REPAIR_MATERIAL_PERCENTAGE = 0.15