163{
165
167 {
170 m_Text = "#open";
171 }
172
174 {
175 m_ConditionItem =
new CCINone();
177 }
178
180 {
181 return true;
182 }
183
185 {
186 return true;
187 }
188
190 {
191 if (!target)
192 return false;
193
194 if (!IsBuilding(target))
195 return false;
196
199 {
200 int doorIndex = building.
GetDoorIndex(target.GetComponentIndex());
201 if (doorIndex != -1)
202 {
204 return false;
205
207
208 }
209 }
210
211 return false;
212 }
213
215 {
216 super.OnStartServer(action_data);
217
219 if (
Class.
CastTo(building, action_data.m_Target.GetObject()))
220 {
221 int doorIndex = building.
GetDoorIndex(action_data.m_Target.GetComponentIndex());
222 if (doorIndex != -1)
223 {
225 {
227 }
228 }
229 }
230 }
231
233 {
234 super.OnEndServer(action_data);
235
237 m_NoisePar.LoadFromPath(
"CfgVehicles SurvivorBase NoiseActionDefault");
240 {
241 if (action_data.m_Player)
243 }
244 }
245
247 {
248 return false;
249 }
250}
251
253{
255 {
256 return false;
257 }
258
260 {
261 return false;
262 }
263};
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 void OpenDoor(int index)
Attempts to open the door.
bool CanDoorBeOpened(int doorIndex, bool checkIfLocked=false)
proto native int GetDoorIndex(int componentIndex)
Gets the index of the door based on the view geometry component index.
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++
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.