Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
construction.c File Reference

Go to the source code of this file.

Data Structures

class  ConstructionBoxTrigger
class  StaticConstructionMethods

Enumerations

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

Functions

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

Variables

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

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

◆ BuildPartServer()

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

◆ CanBuildPart()

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

◆ CanDestroyPart()

bool CanDestroyPart ( string part_name)
protected

Definition at line 566 of file construction.c.

References HasDependentPart(), and IsPartConstructed().

Referenced by GetConstructionPartToDestroy().

◆ CanDismantlePart()

bool CanDismantlePart ( string part_name,
ItemBase tool )
protected

◆ CanUseToolToBuildPart()

bool CanUseToolToBuildPart ( string part_name,
ItemBase tool )
protected

◆ CanUseToolToDismantlePart()

bool CanUseToolToDismantlePart ( string part_name,
ItemBase tool )
protected

◆ CollisionCheckData()

◆ Construction()

◆ CreateCollisionTrigger()

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

◆ DestroyCollisionTrigger()

void DestroyCollisionTrigger ( )
protected

Definition at line 1218 of file construction.c.

References g_Game, and m_ConstructionBoxTrigger.

Referenced by BuildPartServer(), and CreateCollisionTrigger().

◆ DestroyConnectedParts()

void DestroyConnectedParts ( string part_name)
protected

◆ DestroyDebugCollisionBox()

void DestroyDebugCollisionBox ( )
protected

◆ DestroyMaterialsServer()

void DestroyMaterialsServer ( Man player,
string part_name )
protected

◆ DestroyPartServer()

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

◆ DismantlePartServer()

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

◆ DrawDebugCollisionBox()

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

◆ DropNonUsableMaterialsServer()

◆ ExceptionCheck()

bool ExceptionCheck ( string part_name)
protected

Exceptions from 'dependent parts' hierarchy are handled here.

Definition at line 157 of file construction.c.

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

Referenced by DestroyConnectedParts().

◆ GetBaseConstructionPart()

ConstructionPart GetBaseConstructionPart ( )
protected

Definition at line 378 of file construction.c.

References ConstructionPart::IsBase(), and m_ConstructionParts.

◆ GetBoxCenter()

vector GetBoxCenter ( vector min_max[2])
protected

Definition at line 1146 of file construction.c.

References Vector().

Referenced by IsColliding(), and IsCollidingEx().

◆ GetCollisionBoxData()

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

◆ GetCollisionBoxSize()

vector GetCollisionBoxSize ( vector min_max[2])
protected

Definition at line 1113 of file construction.c.

References Math::AbsFloat(), and Vector().

Referenced by GetTriggerExtents(), IsColliding(), and IsCollidingEx().

◆ GetConstructionPart()

◆ GetConstructionParts()

map< string, ref ConstructionPart > GetConstructionParts ( )
protected

Definition at line 275 of file construction.c.

References m_ConstructionParts.

◆ GetConstructionPartsToBuild()

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

◆ GetConstructionPartToDestroy()

ConstructionPart GetConstructionPartToDestroy ( string part_name)
protected

Definition at line 556 of file construction.c.

References CanDestroyPart(), and GetConstructionPart().

◆ GetConstructionPartToDismantle()

ConstructionPart GetConstructionPartToDismantle ( string part_name,
ItemBase tool )
protected

Definition at line 458 of file construction.c.

References CanDismantlePart(), and GetConstructionPart().

◆ GetGateConstructionPart()

ConstructionPart GetGateConstructionPart ( )
protected

Definition at line 395 of file construction.c.

References ConstructionPart::IsGate(), and m_ConstructionParts.

◆ GetMaterialType()

◆ GetRequiredParts()

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

Definition at line 546 of file construction.c.

References g_Game, and GetParent().

Referenced by UpdateConstructionParts().

◆ GetTriggerExtents()

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

Definition at line 1158 of file construction.c.

References GetCollisionBoxSize().

Referenced by CreateCollisionTrigger().

◆ GetValidDepenentPartsArray()

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

◆ HasConflictPart()

bool HasConflictPart ( string part_name)
protected

◆ HasDependentPart()

bool HasDependentPart ( string part_name)
protected

◆ HasMaterials()

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

◆ HasMaterialWithQuantityAttached()

bool HasMaterialWithQuantityAttached ( string slot_name,
float quantity )
protected

Definition at line 658 of file construction.c.

References GetParent().

Referenced by HasMaterials().

◆ HasRequiredPart()

bool HasRequiredPart ( string part_name)
protected

◆ HideConstructionPart()

void HideConstructionPart ( string part_name)
protected

Definition at line 584 of file construction.c.

References bsbDebugPrint(), GetParent(), and LogManager::IsBaseBuildingLogEnable().

Referenced by UpdateVisuals().

◆ HideConstructionPartPhysics()

void HideConstructionPartPhysics ( string part_name)
protected

Definition at line 596 of file construction.c.

References GetParent().

Referenced by UpdatePhysics().

◆ Init()

void Init ( )
protected

Definition at line 34 of file construction.c.

References UpdateConstructionParts().

◆ InitBaseState()

void InitBaseState ( )
protected

◆ InitVisuals()

◆ IsColliding()

◆ IsCollidingEx()

◆ IsPartConstructed()

◆ IsTriggerColliding()

bool IsTriggerColliding ( )
protected

Definition at line 1224 of file construction.c.

References m_ConstructionBoxTrigger.

◆ MaterialIsRuined()

bool MaterialIsRuined ( string part_name)
protected

Definition at line 306 of file construction.c.

References g_Game, GetConstructionPart(), ConstructionPart::GetMainPartName(), and GetParent().

Referenced by CanBuildPart().

◆ ReceiveMaterialsServer()

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

◆ RemoveFromConstructedParts()

void RemoveFromConstructedParts ( string part_name)
protected

◆ SetLockOnAttachedMaterials()

void SetLockOnAttachedMaterials ( string part_name,
bool lock_slot )
protected

◆ SetParent()

void SetParent ( BaseBuildingBase parent)
protected

Definition at line 44 of file construction.c.

References m_Parent.

◆ ShowConstructionPart()

void ShowConstructionPart ( string part_name)
protected

Definition at line 578 of file construction.c.

References bsbDebugPrint(), GetParent(), and LogManager::IsBaseBuildingLogEnable().

Referenced by InitVisuals(), and UpdateVisuals().

◆ ShowConstructionPartPhysics()

void ShowConstructionPartPhysics ( string part_name)
protected

Definition at line 591 of file construction.c.

References GetParent().

Referenced by UpdatePhysics().

◆ TakeMaterialsServer()

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

◆ UpdateConstructionParts()

void UpdateConstructionParts ( )
protected

◆ UpdatePhysics()

◆ UpdateVisuals()

Variable Documentation

◆ DECONSTURCT_MATERIAL_LOSS

const float DECONSTURCT_MATERIAL_LOSS = 0.2
static

Definition at line 14 of file construction.c.

◆ m_AdditionalExcludes

class StaticConstructionMethods m_AdditionalExcludes
protected

Data structure for passing parameters (extendable, modable).

Referenced by CollisionCheckData().

◆ m_CollisionBox

◆ m_ConstructionBoxTrigger

ConstructionBoxTrigger m_ConstructionBoxTrigger
protected

◆ m_ConstructionParts

◆ 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.

Referenced by CollisionCheckData().

◆ m_PrimaryGeometry

int m_PrimaryGeometry
protected

Definition at line 1326 of file construction.c.

Referenced by CollisionCheckData().

◆ m_SecondaryGeometry

int m_SecondaryGeometry
protected

Definition at line 1327 of file construction.c.

Referenced by CollisionCheckData().

◆ REPAIR_MATERIAL_PERCENTAGE

enum ConstructionMaterialType REPAIR_MATERIAL_PERCENTAGE = 0.15