DayZ 1.24
Loading...
Searching...
No Matches
ActionDisarmExplosiveWithRemoteDetonatorUnpaired.c File Reference

Go to the source code of this file.

Classes

class  ActionDisarmExplosiveWithRemoteDetonatorUnpairedCB
 

Functions

ActionDisarmExplosiveWithRemoteDetonatorUnpairedCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonatorUnpaired ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 

Function Documentation

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

explosives only

RD trigger

RD kit

Definition at line 26 of file ActionDisarmExplosiveWithRemoteDetonatorUnpaired.c.

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 }
RemoteDetonatorTrigger RemoteDetonator RemoteDetonatorReceiver()

References RemoteDetonatorReceiver().

◆ ActionDisarmExplosiveWithRemoteDetonatorUnpaired()

ActionDisarmExplosiveWithRemoteDetonatorUnpairedCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonatorUnpaired ( )

Definition at line 1 of file ActionDisarmExplosiveWithRemoteDetonatorUnpaired.c.

12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
15 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
16 m_FullBody = true;
17 m_Text = "#disarm";
18 }
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

Referenced by OnVariablesSynchronized(), ActionConstructor::RegisterActions(), and RemoteDetonatorReceiver().

◆ CreateActionComponent()

override void ActionDisarmExplosiveWithRemoteDetonatorUnpaired::CreateActionComponent ( )

Definition at line 12 of file ActionDisarmExplosiveWithRemoteDetonatorUnpaired.c.

12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
15 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;

References m_FullBody, m_StanceMask, and m_Text.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

Definition at line 20 of file ActionDisarmExplosiveWithRemoteDetonatorUnpaired.c.

21 {
24 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)

claymore has integrated detonator

refresh IK, item changed

Definition at line 59 of file ActionDisarmExplosiveWithRemoteDetonatorUnpaired.c.

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 }
base class for transformation operations (creating one item from another)