DayZ 1.24
Loading...
Searching...
No Matches
ConstructionPart.c
Go to the documentation of this file.
2{
3 string m_Name; //localized text name that is displayed ingame
4 int m_Id; //a number used for synchronization and persistence purposes, must be unique and withing sync limit (total number of bits in all sync/persistence variables)
5 string m_PartName; //config class name
6 string m_MainPartName; //main (parent) config class name
7 bool m_IsBuilt; //defines part build state
8 bool m_IsBase; //defines if this part is the foundation of the whole construction
9 bool m_IsGate; //defines part gate state
10 ref array<string> m_RequiredParts; //list of parts required by this part
11
23
24 string GetName()
25 {
26 string ret = Widget.TranslateString(m_Name);
27 return ret;
28 }
29
30 string GetPartName()
31 {
32 return m_PartName;
33 }
34
36 {
37 return m_MainPartName;
38 }
39
40 int GetId()
41 {
42 return m_Id;
43 }
44
45 bool IsBuilt()
46 {
47 return m_IsBuilt;
48 }
49
51 {
52 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] SetBuildState=" + is_built + " part=" + m_PartName);
54 }
55
57 {
58 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] SetRequestBuiltState=" + req_built + " part=" + m_PartName);
59 if (GetGame().IsMultiplayer())
61 else
62 ; // skip set to true in single player - will be synced later
63 }
64
65 bool IsBase()
66 {
67 return m_IsBase;
68 }
69
70 bool IsGate()
71 {
72 return m_IsGate;
73 }
74
79}
class BaseBuildingBase extends ItemBase bsbDebugPrint(string s)
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
void SetBuiltState(bool is_built)
void ConstructionPart(string name, string part_name, string main_part_name, int id, bool is_built, bool is_base, bool is_gate, array< string > required_parts)
void SetRequestBuiltState(bool req_built)
ref array< string > m_RequiredParts
array< string > GetRequiredParts()
static bool IsBaseBuildingLogEnable()
Definition Debug.c:779
proto native CGame GetGame()