Dayz Explorer
1.29.162510
Loading...
Searching...
No Matches
actiondisarmexplosivewithremotedetonatorunpaired.c
Go to the documentation of this file.
1
class
ActionDisarmExplosiveWithRemoteDetonatorUnpairedCB
:
ActionDisarmExplosiveCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
m_ActionData
.m_ActionComponent =
new
CAContinuousTime
(
UATimeSpent
.DISARM_EXPLOSIVE_REMOTE_UNPAIRED);
6
}
7
}
8
9
class
ActionDisarmExplosiveWithRemoteDetonatorUnpaired
:
ActionDisarmExplosiveWithRemoteDetonator
10
{
11
void
ActionDisarmExplosiveWithRemoteDetonatorUnpaired
()
12
{
13
m_CallbackClass =
ActionDisarmExplosiveWithRemoteDetonatorUnpairedCB
;
14
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_INTERACT;
15
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_CROUCH;
16
m_FullBody =
true
;
17
m_Text =
"#disarm"
;
18
}
19
20
override
void
CreateConditionComponents
()
21
{
22
m_ConditionItem =
new
CCINonRuined
();
23
m_ConditionTarget =
new
CCTCursor
();
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
57
RemoteDetonatorTrigger
rdt =
RemoteDetonatorTrigger
.Cast(item);
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
73
override
void
OnStartServer
(
ActionData
action_data)
74
{
75
super.OnStartServer(action_data);
76
77
ExplosivesBase
item =
ExplosivesBase
.Cast(action_data.m_Target.GetObject());
78
if
(item.GetDisarmSoundsetUnpaired() !=
string
.Empty)
79
item.StartItemSoundServer(SoundConstants.ITEM_EXPLOSIVE_DISARM_UNPAIRED);
80
}
81
82
override
void
OnEndServer
(
ActionData
action_data)
83
{
84
super.OnEndServer(action_data);
85
86
ExplosivesBase
item =
ExplosivesBase
.Cast(action_data.m_Target.GetObject());
87
if
(item.GetDisarmSoundsetUnpaired() !=
string
.Empty)
88
item.StopItemSoundServer(SoundConstants.ITEM_EXPLOSIVE_DISARM_UNPAIRED);
89
}
90
91
override
void
OnFinishProgressServer
(
ActionData
action_data)
92
{
93
ExplosivesBase
target =
ExplosivesBase
.Cast(action_data.m_Target.GetObject());
94
ItemBase
detonator =
ItemBase
.Cast(action_data.m_MainItem);
95
96
target.Disarm();
97
target.SetTakeable(
true
);
98
100
if
(target.IsInherited(
ClaymoreMine
))
101
{
102
detonator.Delete();
103
return
;
104
}
105
106
ReplaceItemWithNewLambdaBase
lambda =
new
ReplaceDetonatorItemLambda
(detonator,
"RemoteDetonator"
);
107
MiscGameplayFunctions.TurnItemIntoItemEx(action_data.m_Player, lambda);
109
action_data.m_Player.GetItemAccessor().OnItemInHandsChanged();
110
}
111
}
OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition
actionactivatetrap.c:131
CreateConditionComponents
override void CreateConditionComponents()
Definition
actionactivatetrap.c:30
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionactivatetrap.c:46
OnStartServer
override void OnStartServer(ActionData action_data)
Definition
actionactivatetrap.c:116
OnEndServer
override void OnEndServer(ActionData action_data)
Definition
actionarmexplosive.c:67
m_CommandUID
int m_CommandUID
Definition
actionbase.c:31
m_StanceMask
int m_StanceMask
Definition
actionbase.c:33
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionDisarmExplosiveWithRemoteDetonator
ActionDisarmExplosiveWithRemoteDetonatorCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonator()
Definition
actiondisarmexplosivewithremotedetonator.c:11
ActionDisarmExplosiveWithRemoteDetonatorUnpaired
ActionDisarmExplosiveWithRemoteDetonatorUnpairedCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonatorUnpaired()
Definition
actiondisarmexplosivewithremotedetonatorunpaired.c:11
CreateActionComponent
override void CreateActionComponent()
Definition
actiondisarmexplosivewithremotedetonatorunpaired.c:12
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
animatedactionbase.c:3
ActionDisarmExplosiveCB
Definition
actiondisarmexplosive.c:2
ActionDisarmExplosiveWithRemoteDetonatorUnpairedCB
Definition
actiondisarmexplosivewithremotedetonatorunpaired.c:2
AlarmClock_ColorBase
Definition
alarmclock.c:2
CAContinuousTime
Definition
cacontinuoustime.c:2
CCINonRuined
Definition
ccinonruined.c:2
CCTCursor
Definition
cctcursor.c:2
ClaymoreMine
Definition
claymoremine.c:2
ItemBase
Definition
inventoryitem.c:742
KitchenTimer
Definition
kitchentimer.c:2
PlayerBase
Definition
playerbaseclient.c:2
RemoteDetonatorTrigger
Definition
remotedetonator.c:47
RemoteDetonatorTrigger::GetControlledDevice
EntityAI GetControlledDevice()
Definition
remotedetonator.c:150
ReplaceDetonatorItemLambda
Definition
remotedetonator.c:259
ReplaceItemWithNewLambdaBase
base class for transformation operations (creating one item from another)
Definition
replaceitemwithnewlambdabase.c:5
UATimeSpent
Definition
actionconstants.c:28
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
ExplosivesBase
void ExplosivesBase()
Definition
explosivesbase.c:42
RemoteDetonatorReceiver
RemoteDetonatorTrigger RemoteDetonator RemoteDetonatorReceiver()
Definition
remotedetonator.c:227
Daten
4_world
classes
useractionscomponent
actions
continuous
actiondisarmexplosivewithremotedetonatorunpaired.c
Generated by
1.16.1