Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_BuildingRegion.c
Go to the documentation of this file.
3{
4 const int MAX_REGION_CONNECT = 128;
5
6 private int m_Region;
7
8 float m_MaxHealth = 500;
9 float m_StructuralSupportPct = 0.55;
10 ResourceName m_DestructFX_PTC = "{B6CBD40830C3F0A4}graphics/particle/legacy/tkom/weapon/destruct_wall.ptc";
11 ResourceName m_DestructFX_SND = "";
12 ResourceName m_DestructFX_PFB = "";
13
14 private SCR_BuildingRegion m_RegionConnect_Out[MAX_REGION_CONNECT];
15 private int m_RegionConnect_OutNum = 0;
16
17 private SCR_BuildingRegion m_RegionConnect_In[MAX_REGION_CONNECT];
18 private int m_RegionConnect_InNum = 0;
19
20 private vector m_RegionPos = vector.Zero;
21 private vector m_RegionSize = vector.Zero;
22
23 //------------------------------------------------------------------------------------------------
24 void SetRegionIndex(int region)
25 {
26 m_Region = region;
27 }
28
29 //------------------------------------------------------------------------------------------------
30 int GetRegionIndex()
31 {
32 return m_Region;
33 }
34
35 //------------------------------------------------------------------------------------------------
36 void SetRegionSize(vector size)
37 {
38 m_RegionSize = size;
39 }
40
41 //------------------------------------------------------------------------------------------------
42 vector GetRegionSize()
43 {
44 return m_RegionSize;
45 }
46
47 //------------------------------------------------------------------------------------------------
48 void SetRegionPos(vector pos)
49 {
50 m_RegionPos = pos;
51 }
52
53 //------------------------------------------------------------------------------------------------
54 vector GetRegionPos()
55 {
56 return m_RegionPos;
57 }
58
59 //------------------------------------------------------------------------------------------------
60 void SetMaxHealth(float health)
61 {
62 m_MaxHealth = health;
63 }
64
65 //------------------------------------------------------------------------------------------------
66 float GetMaxHealth()
67 {
68 return m_MaxHealth;
69 }
70
71 //------------------------------------------------------------------------------------------------
72 void SetDestructFX(ResourceName ptc, ResourceName snd, ResourceName pfb)
73 {
74 m_DestructFX_PTC = ptc;
75 m_DestructFX_SND = snd;
76 m_DestructFX_PFB = pfb;
77 }
78
79 //------------------------------------------------------------------------------------------------
80 bool GetDestructFX(out ResourceName ptc, out ResourceName snd, out ResourceName pfb)
81 {
82 if (m_DestructFX_PTC == string.Empty && m_DestructFX_SND == string.Empty && m_DestructFX_PFB == string.Empty)
83 return false;
84
85 ptc = m_DestructFX_PTC;
86 snd = m_DestructFX_SND;
87 pfb = m_DestructFX_PFB;
88
89 return true;
90 }
91
92 //------------------------------------------------------------------------------------------------
93 void SetStructuralSupportPercentage(float pct)
94 {
95 m_StructuralSupportPct = pct;
96 }
97
98 //------------------------------------------------------------------------------------------------
99 float GetStructuralSupportPercentage()
100 {
101 return m_StructuralSupportPct;
102 }
103
104 //------------------------------------------------------------------------------------------------
105 void AddConnectionIn(SCR_BuildingRegion region)
106 {
107 m_RegionConnect_In[m_RegionConnect_InNum++] = region;
108 }
109
110 //------------------------------------------------------------------------------------------------
111 void AddConnectionOut(SCR_BuildingRegion region)
112 {
113 m_RegionConnect_Out[m_RegionConnect_OutNum++] = region;
114 }
115
116 //------------------------------------------------------------------------------------------------
117 int GetConnectionNumIn()
118 {
119 return m_RegionConnect_InNum;
120 }
121
122 //------------------------------------------------------------------------------------------------
123 int GetConnectionNumOut()
124 {
125 return m_RegionConnect_OutNum;
126 }
127
128 //------------------------------------------------------------------------------------------------
129 SCR_BuildingRegion GetConnectedRegionIn(int index)
130 {
131 if (index >= m_RegionConnect_InNum)
132 return null;
133
134 return m_RegionConnect_In[index];
135 }
136
137 //------------------------------------------------------------------------------------------------
138 SCR_BuildingRegion GetConnectedRegionOut(int index)
139 {
140 if (index >= m_RegionConnect_OutNum)
141 return null;
142
143 return m_RegionConnect_Out[index];
144 }
145};
int size
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
float GetMaxHealth()
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index