DayZ 1.24
Loading...
Searching...
No Matches
ActionDisarmExplosiveWithRemoteDetonatorUnpaired.c
Go to the documentation of this file.
19
21 {
24 }
25
26 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
27 {
28 if (!target)
29 return false;
30
32 ExplosivesBase explosive = ExplosivesBase.Cast(target.GetObject());
33 if (!explosive)
34 return false;
35
36 if (explosive.IsRuined() || !explosive.GetArmed() || !explosive.CanBeDisarmed())
37 return false;
38
39 if (explosive.GetAttachmentByType(KitchenTimer) || explosive.GetAttachmentByType(AlarmClock_ColorBase))
40 return false;
41
43 if (!explosive.IsInherited(ClaymoreMine) && attachedReceiver && attachedReceiver.IsRuined())
44 return false;
45
48 if (rdt && target.GetObject() != rdt.GetControlledDevice())
49 return true;
50
52 RemoteDetonator rd = RemoteDetonator.Cast(item);
53 if (rd && rd.IsKit())
54 return true;
55
56 return false;
57 }
58
60 {
61 ExplosivesBase target = ExplosivesBase.Cast(action_data.m_Target.GetObject());
62 ItemBase detonator = ItemBase.Cast(action_data.m_MainItem);
63
64 target.Disarm();
65 target.SetTakeable(true);
66
68 if (target.IsInherited(ClaymoreMine))
69 {
70 detonator.Delete();
71 return;
72 }
73
75 MiscGameplayFunctions.TurnItemIntoItemEx(action_data.m_Player, lambda);
77 action_data.m_Player.GetItemAccessor().OnItemInHandsChanged();
78 }
79}
override void OnFinishProgressServer(ActionData action_data)
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
void CreateConditionComponents()
Definition ActionBase.c:196
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionBase.c:350
int m_StanceMask
Definition ActionBase.c:53
ActionDisarmExplosiveWithRemoteDetonatorCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonator()
ActionDisarmExplosiveWithRemoteDetonatorUnpairedCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonatorUnpaired()
RemoteDetonatorTrigger RemoteDetonator RemoteDetonatorReceiver()
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
base class for transformation operations (creating one item from another)
const float DISARM_EXPLOSIVE_REMOTE_UNPAIRED
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597