DayZ
1.24
Loading...
Searching...
No Matches
ConstructionPart.c
Go to the documentation of this file.
1
class
ConstructionPart
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
12
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
)
13
{
14
m_Name
=
name
;
15
m_PartName
=
part_name
;
16
m_MainPartName
=
main_part_name
;
17
m_Id
=
id
;
18
m_IsBuilt
=
is_built
;
19
m_IsBase
=
is_base
;
20
m_IsGate
=
is_gate
;
21
m_RequiredParts
=
required_parts
;
22
}
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
35
string
GetMainPartName
()
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
50
void
SetBuiltState
(
bool
is_built
)
51
{
52
if
(
LogManager
.
IsBaseBuildingLogEnable
())
bsbDebugPrint
(
"[bsb] SetBuildState="
+
is_built
+
" part="
+
m_PartName
);
53
m_IsBuilt
=
is_built
;
54
}
55
56
void
SetRequestBuiltState
(
bool
req_built
)
57
{
58
if
(
LogManager
.
IsBaseBuildingLogEnable
())
bsbDebugPrint
(
"[bsb] SetRequestBuiltState="
+
req_built
+
" part="
+
m_PartName
);
59
if
(
GetGame
().IsMultiplayer())
60
SetBuiltState
(
req_built
);
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
75
array<string>
GetRequiredParts
()
76
{
77
return
m_RequiredParts
;
78
}
79
}
bsbDebugPrint
class BaseBuildingBase extends ItemBase bsbDebugPrint(string s)
Definition
BaseBuildingBase.c:1176
name
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
ConstructionPart
Definition
ConstructionPart.c:2
ConstructionPart::GetId
int GetId()
Definition
ConstructionPart.c:40
ConstructionPart::IsGate
bool IsGate()
Definition
ConstructionPart.c:70
ConstructionPart::m_Name
string m_Name
Definition
ConstructionPart.c:3
ConstructionPart::m_IsBuilt
bool m_IsBuilt
Definition
ConstructionPart.c:7
ConstructionPart::GetPartName
string GetPartName()
Definition
ConstructionPart.c:30
ConstructionPart::IsBase
bool IsBase()
Definition
ConstructionPart.c:65
ConstructionPart::GetName
string GetName()
Definition
ConstructionPart.c:24
ConstructionPart::SetBuiltState
void SetBuiltState(bool is_built)
Definition
ConstructionPart.c:50
ConstructionPart::IsBuilt
bool IsBuilt()
Definition
ConstructionPart.c:45
ConstructionPart::ConstructionPart
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)
Definition
ConstructionPart.c:12
ConstructionPart::m_MainPartName
string m_MainPartName
Definition
ConstructionPart.c:6
ConstructionPart::m_IsGate
bool m_IsGate
Definition
ConstructionPart.c:9
ConstructionPart::m_PartName
string m_PartName
Definition
ConstructionPart.c:5
ConstructionPart::m_IsBase
bool m_IsBase
Definition
ConstructionPart.c:8
ConstructionPart::SetRequestBuiltState
void SetRequestBuiltState(bool req_built)
Definition
ConstructionPart.c:56
ConstructionPart::m_RequiredParts
ref array< string > m_RequiredParts
Definition
ConstructionPart.c:10
ConstructionPart::m_Id
int m_Id
Definition
ConstructionPart.c:4
ConstructionPart::GetRequiredParts
array< string > GetRequiredParts()
Definition
ConstructionPart.c:75
ConstructionPart::GetMainPartName
string GetMainPartName()
Definition
ConstructionPart.c:35
LogManager
Definition
Debug.c:675
LogManager::IsBaseBuildingLogEnable
static bool IsBaseBuildingLogEnable()
Definition
Debug.c:779
Param3
Definition
EntityAI.c:95
Widget
Definition
EnWidgets.c:190
GetGame
proto native CGame GetGame()
scripts
4_World
Classes
BaseBuilding
ConstructionPart.c
Generated by
1.10.0