104{
106
108 {
111 m_Text = "#open";
112 }
113
115 {
116 m_ConditionItem =
new CCINone();
118 }
119
121 {
122 return true;
123 }
124
126 {
127 return true;
128 }
129
131 {
132 if (!target)
133 return false;
134
135 if (!IsBuilding(target))
136 return false;
137
138 Building building;
140 {
141 int doorIndex = building.GetDoorIndex(target.GetComponentIndex());
142 if (doorIndex != -1)
143 {
145 return false;
146
148
149 }
150 }
151
152 return false;
153 }
154
156 {
157 super.OnStartServer(action_data);
158
159 Building building;
160 if (
Class.
CastTo(building, action_data.m_Target.GetObject()))
161 {
162 int doorIndex = building.GetDoorIndex(action_data.m_Target.GetComponentIndex());
163 if (doorIndex != -1)
164 {
166 {
167 building.OpenDoor(doorIndex);
168 }
169 }
170 }
171 }
172
174 {
175 super.OnEndServer(action_data);
176
178 m_NoisePar.LoadFromPath(
"CfgVehicles SurvivorBase NoiseActionDefault");
181 {
182 if (action_data.m_Player)
184 }
185 }
186
188 {
189 return false;
190 }
191}
192
194{
196 {
197 return false;
198 }
199
201 {
202 return false;
203 }
204};
override bool IsLockTargetOnUse()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void OnStartServer(ActionData action_data)
override void OnEndServer(ActionData action_data)
ref NoiseParams m_NoisePar
override void CreateConditionComponents()
ActionOpenDoors ActionInteractBase CheckIfDoorIsLocked()
class ActionTargets ActionTarget
class NoiseSystem NoiseParams()
bool CheckIfDoorIsLocked()
proto native NoiseSystem GetNoiseSystem()
Super root of all classes in Enforce script.
static float GetNoiseReduction(Weather weather)
proto void AddNoisePos(EntityAI source_entity, vector pos, NoiseParams noise_params, float external_strenght_multiplier=1.0)
DayZPlayerConstants
defined in C++
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.