DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ConstructionPart.c
См. документацию.
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
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
79}
class BaseBuildingBase extends ItemBase bsbDebugPrint(string s)
Определения BaseBuildingBase.c:1292
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
int GetId()
Определения ConstructionPart.c:40
bool IsGate()
Определения ConstructionPart.c:70
string m_Name
Определения ConstructionPart.c:3
bool m_IsBuilt
Определения ConstructionPart.c:7
string GetPartName()
Определения ConstructionPart.c:30
bool IsBase()
Определения ConstructionPart.c:65
string GetName()
Определения ConstructionPart.c:24
void SetBuiltState(bool is_built)
Определения ConstructionPart.c:50
bool IsBuilt()
Определения ConstructionPart.c:45
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)
Определения ConstructionPart.c:12
string m_MainPartName
Определения ConstructionPart.c:6
bool m_IsGate
Определения ConstructionPart.c:9
string m_PartName
Определения ConstructionPart.c:5
bool m_IsBase
Определения ConstructionPart.c:8
void SetRequestBuiltState(bool req_built)
Определения ConstructionPart.c:56
ref array< string > m_RequiredParts
Определения ConstructionPart.c:10
int m_Id
Определения ConstructionPart.c:4
array< string > GetRequiredParts()
Определения ConstructionPart.c:75
string GetMainPartName()
Определения ConstructionPart.c:35
static bool IsBaseBuildingLogEnable()
Определения Debug.c:698
Определения Debug.c:594
Определения EnWidgets.c:190
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()