DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionDisarmExplosiveWithRemoteDetonatorUnpaired.c
См. документацию.
19
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
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 OnFinishProgressServer(ActionData action_data)
74 {
75 ExplosivesBase target = ExplosivesBase.Cast(action_data.m_Target.GetObject());
76 ItemBase detonator = ItemBase.Cast(action_data.m_MainItem);
77
78 target.Disarm();
79 target.SetTakeable(true);
80
82 if (target.IsInherited(ClaymoreMine))
83 {
84 detonator.Delete();
85 return;
86 }
87
88 ReplaceItemWithNewLambdaBase lambda = new ReplaceDetonatorItemLambda(detonator, "RemoteDetonator");
89 MiscGameplayFunctions.TurnItemIntoItemEx(action_data.m_Player, lambda);
91 action_data.m_Player.GetItemAccessor().OnItemInHandsChanged();
92 }
93}
override void OnFinishProgressServer(ActionData action_data)
Определения ActionActivateTrap.c:116
override void CreateConditionComponents()
Определения ActionActivateTrap.c:30
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Определения ActionActivateTrap.c:46
int m_CommandUID
Определения ActionBase.c:31
int m_StanceMask
Определения ActionBase.c:33
ActionBase ActionData
Определения ActionBase.c:30
ActionDisarmExplosiveWithRemoteDetonatorCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonator()
ActionDisarmExplosiveWithRemoteDetonatorUnpairedCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonatorUnpaired()
class ActionTargets ActionTarget
void ExplosivesBase()
Определения ExplosivesBase.c:42
RemoteDetonatorTrigger RemoteDetonator RemoteDetonatorReceiver()
Определения RemoteDetonator.c:227
ActionData m_ActionData
Определения AnimatedActionBase.c:3
Определения AlarmClock.c:2
Определения CCINonRuined.c:2
Определения CCTCursor.c:2
Определения ClaymoreMine.c:2
Определения InventoryItem.c:731
Определения KitchenTimer.c:2
Определения PlayerBaseClient.c:2
EntityAI GetControlledDevice()
Определения RemoteDetonator.c:150
base class for transformation operations (creating one item from another)
Определения ReplaceItemWithNewLambdaBase.c:5
const float DISARM_EXPLOSIVE_REMOTE_UNPAIRED
Определения ActionConstants.c:91
Определения ActionConstants.c:28
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602