Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
construction.c File Reference

Go to the source code of this file.

Classes

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)
 
BaseBuildingBase GetParent ()
 Get parent of the Effect.
 
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.
 
void InitVisuals ()
 
void UpdateVisuals ()
 
void UpdatePhysics ()
 
void InitBaseState ()
 
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 ()
 
bool HasRequiredPart (string part_name)
 
bool HasConflictPart (string part_name)
 
ConstructionPart GetConstructionPartToDismantle (string part_name, ItemBase tool)
 
bool CanDismantlePart (string part_name, ItemBase tool)
 
bool HasDependentPart (string part_name)
 
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)
 
void ShowConstructionPart (string part_name)
 
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)
 
bool HasMaterialWithQuantityAttached (string slot_name, float quantity)
 
void TakeMaterialsServer (string part_name, bool repairing=false)
 
void ReceiveMaterialsServer (notnull Man player, string part_name, string damagezone_name)
 
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.
 
vector GetCollisionBoxSize (vector min_max[2])
 
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])
 
void DrawDebugCollisionBox (vector min_max[2], int color)
 
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
 
ref map< string, ref ConstructionPartm_ConstructionParts
 
BaseBuildingBase m_Parent
 
Shape m_CollisionBox
 
ConstructionBoxTrigger m_ConstructionBoxTrigger
 
class StaticConstructionMethods m_AdditionalExcludes
 Data structure for passing parameters (extendable, modable)
 
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)
protected

Definition at line 52 of file construction.c.

◆ BuildPartServer()

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

Definition at line 75 of file construction.c.

◆ CanBuildPart()

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

Definition at line 296 of file construction.c.

◆ CanDestroyPart()

bool CanDestroyPart ( string part_name)
protected

Definition at line 566 of file construction.c.

◆ CanDismantlePart()

bool CanDismantlePart ( string part_name,
ItemBase tool )
protected

Definition at line 468 of file construction.c.

◆ CanUseToolToBuildPart()

bool CanUseToolToBuildPart ( string part_name,
ItemBase tool )
protected

Definition at line 959 of file construction.c.

◆ CanUseToolToDismantlePart()

bool CanUseToolToDismantlePart ( string part_name,
ItemBase tool )
protected

Definition at line 982 of file construction.c.

◆ CollisionCheckData()

void CollisionCheckData ( )
protected

Definition at line 1329 of file construction.c.

◆ Construction()

void Construction ( BaseBuildingBase parent)
protected

Definition at line 26 of file construction.c.

◆ CreateCollisionTrigger()

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

Definition at line 1190 of file construction.c.

◆ DestroyCollisionTrigger()

void DestroyCollisionTrigger ( )
protected

Definition at line 1218 of file construction.c.

◆ DestroyConnectedParts()

void DestroyConnectedParts ( string part_name)
protected

Definition at line 141 of file construction.c.

◆ DestroyDebugCollisionBox()

void DestroyDebugCollisionBox ( )
protected

Definition at line 1181 of file construction.c.

◆ DestroyMaterialsServer()

void DestroyMaterialsServer ( Man player,
string part_name )
protected

Definition at line 740 of file construction.c.

◆ DestroyPartServer()

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

Definition at line 121 of file construction.c.

◆ DismantlePartServer()

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

Definition at line 98 of file construction.c.

◆ DrawDebugCollisionBox()

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

Definition at line 1170 of file construction.c.

◆ DropNonUsableMaterialsServer()

void DropNonUsableMaterialsServer ( Man player,
string part_name )
protected

Definition at line 788 of file construction.c.

◆ ExceptionCheck()

bool ExceptionCheck ( string part_name)
protected

Exceptions from 'dependent parts' hierarchy are handled here.

Definition at line 157 of file construction.c.

◆ GetBaseConstructionPart()

ConstructionPart GetBaseConstructionPart ( )
protected

Definition at line 378 of file construction.c.

◆ GetBoxCenter()

vector GetBoxCenter ( vector min_max[2])
protected

Definition at line 1146 of file construction.c.

◆ GetCollisionBoxData()

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

Definition at line 1125 of file construction.c.

◆ GetCollisionBoxSize()

vector GetCollisionBoxSize ( vector min_max[2])
protected

Definition at line 1113 of file construction.c.

◆ GetConstructionPart()

ConstructionPart GetConstructionPart ( string part_name)
protected

Definition at line 280 of file construction.c.

◆ GetConstructionParts()

map< string, ref ConstructionPart > GetConstructionParts ( )
protected

Definition at line 275 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 )
protected

Definition at line 339 of file construction.c.

◆ GetConstructionPartToDestroy()

ConstructionPart GetConstructionPartToDestroy ( string part_name)
protected

Definition at line 556 of file construction.c.

◆ GetConstructionPartToDismantle()

ConstructionPart GetConstructionPartToDismantle ( string part_name,
ItemBase tool )
protected

Definition at line 458 of file construction.c.

◆ GetGateConstructionPart()

ConstructionPart GetGateConstructionPart ( )
protected

Definition at line 395 of file construction.c.

◆ GetMaterialType()

ConstructionMaterialType GetMaterialType ( string part_name)
protected

Definition at line 1005 of file construction.c.

◆ GetRequiredParts()

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

Definition at line 546 of file construction.c.

◆ GetTriggerExtents()

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

Definition at line 1158 of file construction.c.

◆ GetValidDepenentPartsArray()

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

Definition at line 499 of file construction.c.

◆ HasConflictPart()

bool HasConflictPart ( string part_name)
protected

Definition at line 438 of file construction.c.

◆ HasDependentPart()

bool HasDependentPart ( string part_name)
protected

Definition at line 479 of file construction.c.

◆ HasMaterials()

bool HasMaterials ( string part_name,
bool repairing = false )
protected

Definition at line 617 of file construction.c.

◆ HasMaterialWithQuantityAttached()

bool HasMaterialWithQuantityAttached ( string slot_name,
float quantity )
protected

Definition at line 658 of file construction.c.

◆ HasRequiredPart()

bool HasRequiredPart ( string part_name)
protected

Definition at line 412 of file construction.c.

◆ HideConstructionPart()

void HideConstructionPart ( string part_name)
protected

Definition at line 584 of file construction.c.

◆ HideConstructionPartPhysics()

void HideConstructionPartPhysics ( string part_name)
protected

Definition at line 596 of file construction.c.

◆ Init()

void Init ( )
protected

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 ( )
protected

Definition at line 228 of file construction.c.

◆ InitVisuals()

void InitVisuals ( )
protected

Definition at line 173 of file construction.c.

◆ IsColliding()

bool IsColliding ( string part_name)
protected

Definition at line 1021 of file construction.c.

◆ IsCollidingEx()

bool IsCollidingEx ( CollisionCheckData check_data)
protected

Collision check for building part.

Definition at line 1070 of file construction.c.

◆ IsPartConstructed()

bool IsPartConstructed ( string part_name)
protected

Definition at line 602 of file construction.c.

◆ IsTriggerColliding()

bool IsTriggerColliding ( )
protected

Definition at line 1224 of file construction.c.

◆ MaterialIsRuined()

bool MaterialIsRuined ( string part_name)
protected

Definition at line 306 of file construction.c.

◆ ReceiveMaterialsServer()

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

Definition at line 726 of file construction.c.

◆ RemoveFromConstructedParts()

void RemoveFromConstructedParts ( string part_name)
protected

Definition at line 63 of file construction.c.

◆ SetLockOnAttachedMaterials()

void SetLockOnAttachedMaterials ( string part_name,
bool lock_slot )
protected

Definition at line 911 of file construction.c.

◆ SetParent()

void SetParent ( BaseBuildingBase parent)
protected

Definition at line 44 of file construction.c.

◆ ShowConstructionPart()

void ShowConstructionPart ( string part_name)
protected

Definition at line 578 of file construction.c.

◆ ShowConstructionPartPhysics()

void ShowConstructionPartPhysics ( string part_name)
protected

Definition at line 591 of file construction.c.

◆ TakeMaterialsServer()

void TakeMaterialsServer ( string part_name,
bool repairing = false )
protected

Definition at line 671 of file construction.c.

◆ UpdateConstructionParts()

void UpdateConstructionParts ( )
protected

Definition at line 235 of file construction.c.

◆ UpdatePhysics()

void UpdatePhysics ( )
protected

Definition at line 207 of file construction.c.

◆ UpdateVisuals()

void UpdateVisuals ( )
protected

Definition at line 188 of file construction.c.

Variable Documentation

◆ m_AdditionalExcludes

class StaticConstructionMethods m_AdditionalExcludes
protected

Data structure for passing parameters (extendable, modable)

◆ m_CollisionBox

Shape m_CollisionBox
protected

Definition at line 19 of file construction.c.

◆ m_ConstructionBoxTrigger

ConstructionBoxTrigger m_ConstructionBoxTrigger
protected

Definition at line 21 of file construction.c.

◆ m_ConstructionParts

ref map<string, ref ConstructionPart> m_ConstructionParts
protected

Definition at line 15 of file construction.c.

◆ m_Parent

BaseBuildingBase m_Parent
protected

Definition at line 16 of file construction.c.

◆ m_PartName

string m_PartName
protected

Definition at line 1325 of file construction.c.

◆ m_PrimaryGeometry

int m_PrimaryGeometry
protected

Definition at line 1326 of file construction.c.

◆ m_SecondaryGeometry

int m_SecondaryGeometry
protected

Definition at line 1327 of file construction.c.

◆ REPAIR_MATERIAL_PERCENTAGE

enum ConstructionMaterialType REPAIR_MATERIAL_PERCENTAGE = 0.15