PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
Construction.c File Reference

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)
 
protected BaseBuildingBase GetParent ()
 Get parent of the Effect.
 
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.
 
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.
 
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
 
static const float DECONSTURCT_MATERIAL_LOSS = 0.2
 
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)
 
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 

Function Documentation

◆ AddToConstructedParts()

◆ BuildPartServer()

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

◆ CanBuildPart()

◆ CanDestroyPart()

bool CanDestroyPart ( string  part_name)

◆ CanDismantlePart()

bool CanDismantlePart ( string  part_name,
ItemBase  tool 
)

◆ CanUseToolToBuildPart()

◆ CanUseToolToDismantlePart()

◆ CollisionCheckData()

◆ Construction()

◆ CreateCollisionTrigger()

◆ DestroyCollisionTrigger()

void DestroyCollisionTrigger ( )

◆ DestroyConnectedParts()

◆ DestroyDebugCollisionBox()

protected void DestroyDebugCollisionBox ( )

◆ DestroyMaterialsServer()

◆ DestroyPartServer()

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

◆ DismantlePartServer()

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

◆ DrawDebugCollisionBox()

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

◆ DropNonUsableMaterialsServer()

◆ ExceptionCheck()

bool ExceptionCheck ( string  part_name)

Exceptions from 'dependent parts' hierarchy are handled here.

References GetConstructionPart(), and ConstructionPart::IsGate().

Referenced by DestroyConnectedParts().

◆ GetBaseConstructionPart()

ConstructionPart GetBaseConstructionPart ( )

◆ GetBoxCenter()

vector GetBoxCenter ( vector  min_max[2])

References Vector().

Referenced by IsColliding(), and IsCollidingEx().

◆ GetCollisionBoxData()

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

◆ GetCollisionBoxSize()

vector GetCollisionBoxSize ( vector  min_max[2])

◆ GetConstructionPart()

◆ GetConstructionParts()

map< string, ref ConstructionPart > GetConstructionParts ( )

References m_ConstructionParts.

◆ GetConstructionPartsToBuild()

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

◆ GetConstructionPartToDestroy()

ConstructionPart GetConstructionPartToDestroy ( string  part_name)

◆ GetConstructionPartToDismantle()

ConstructionPart GetConstructionPartToDismantle ( string  part_name,
ItemBase  tool 
)

◆ GetGateConstructionPart()

ConstructionPart GetGateConstructionPart ( )

◆ GetMaterialType()

◆ GetRequiredParts()

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

◆ GetTriggerExtents()

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

References GetCollisionBoxSize().

Referenced by CreateCollisionTrigger().

◆ GetValidDepenentPartsArray()

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

◆ HasConflictPart()

◆ HasDependentPart()

◆ HasMaterials()

◆ HasMaterialWithQuantityAttached()

protected bool HasMaterialWithQuantityAttached ( string  slot_name,
float  quantity 
)

References GetParent().

Referenced by HasMaterials().

◆ HasRequiredPart()

◆ HideConstructionPart()

protected void HideConstructionPart ( string  part_name)

◆ HideConstructionPartPhysics()

void HideConstructionPartPhysics ( string  part_name)

References GetParent().

Referenced by UpdatePhysics().

◆ Init()

void Init ( )

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

References UpdateConstructionParts().

◆ InitBaseState()

void InitBaseState ( )

◆ InitVisuals()

◆ IsColliding()

◆ IsCollidingEx()

◆ IsPartConstructed()

◆ IsTriggerColliding()

bool IsTriggerColliding ( )

◆ MaterialIsRuined()

◆ ReceiveMaterialsServer()

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

◆ RemoveFromConstructedParts()

◆ SetLockOnAttachedMaterials()

◆ SetParent()

protected void SetParent ( BaseBuildingBase  parent)

References m_Parent.

◆ ShowConstructionPart()

protected void ShowConstructionPart ( string  part_name)

◆ ShowConstructionPartPhysics()

void ShowConstructionPartPhysics ( string  part_name)

References GetParent().

Referenced by UpdatePhysics().

◆ TakeMaterialsServer()

◆ UpdateConstructionParts()

◆ UpdatePhysics()

◆ UpdateVisuals()

Variable Documentation

◆ DECONSTURCT_MATERIAL_LOSS

const float DECONSTURCT_MATERIAL_LOSS = 0.2
static

◆ m_AdditionalExcludes

class StaticConstructionMethods m_AdditionalExcludes

Data structure for passing parameters (extendable, modable)

Referenced by CollisionCheckData().

◆ m_CollisionBox

protected Shape m_CollisionBox

◆ m_ConstructionBoxTrigger

protected ConstructionBoxTrigger m_ConstructionBoxTrigger

◆ m_ConstructionParts

◆ m_Parent

protected BaseBuildingBase m_Parent

◆ m_PartName

string m_PartName

Referenced by CollisionCheckData().

◆ m_PrimaryGeometry

int m_PrimaryGeometry

Referenced by CollisionCheckData().

◆ m_SecondaryGeometry

int m_SecondaryGeometry

Referenced by CollisionCheckData().

◆ REPAIR_MATERIAL_PERCENTAGE

enum ConstructionMaterialType REPAIR_MATERIAL_PERCENTAGE = 0.15