DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
ActionDisarmExplosiveWithRemoteDetonatorUnpaired.c
Go to the documentation of this file.
2{
3 override void CreateActionComponent()
4 {
6 }
7}
8
10{
12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
15 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
16 m_FullBody = true;
17 m_Text = "#disarm";
18 }
19
21 {
24 }
25
26 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
27 {
28 if (!target)
29 {
30 return false;
31 }
32
34 ExplosivesBase explosive = ExplosivesBase.Cast(target.GetObject());
35 if (!explosive)
36 {
37 return false;
38 }
39
40 if (explosive.IsRuined() || !explosive.GetArmed() || !explosive.CanBeDisarmed())
41 {
42 return false;
43 }
44
45 if (explosive.GetAttachmentByType(KitchenTimer) || explosive.GetAttachmentByType(AlarmClock_ColorBase))
46 {
47 return false;
48 }
49
50 RemoteDetonatorReceiver attachedReceiver = RemoteDetonatorReceiver.Cast(explosive.GetAttachmentByType(RemoteDetonatorReceiver));
51 if (!explosive.IsInherited(ClaymoreMine) && attachedReceiver && attachedReceiver.IsRuined())
52 {
53 return false;
54 }
55
58 if (rdt && target.GetObject() != rdt.GetControlledDevice())
59 {
60 return true;
61 }
62
64 RemoteDetonator rd = RemoteDetonator.Cast(item);
65 if (rd && rd.IsKit())
66 {
67 return true;
68 }
69
70 return false;
71 }
72}
void CreateConditionComponents()
Definition ActionBase.c:218
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
protected bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionBase.c:372
protected string m_Text
Definition ActionBase.c:49
protected bool m_FullBody
Definition ActionBase.c:52
protected int m_StanceMask
Definition ActionBase.c:53
ActionDisarmExplosiveWithRemoteDetonatorCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonator()
ActionDisarmExplosiveWithRemoteDetonatorUnpairedCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonatorUnpaired()
class ActionTargets ActionTarget
void ExplosivesBase()
RemoteDetonatorTrigger RemoteDetonator RemoteDetonatorReceiver()
protected ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
const float DISARM_EXPLOSIVE_REMOTE_UNPAIRED
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602