DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл ActionDisarmExplosiveWithRemoteDetonator.c

См. исходные тексты.

Структуры данных

class  ActionDisarmExplosiveWithRemoteDetonatorCB
 

Функции

ActionDisarmExplosiveWithRemoteDetonatorCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonator ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override bool CanBeSetFromInventory ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
32 {
33 if (!target)
34 return false;
35
36 ExplosivesBase explosive = ExplosivesBase.Cast(target.GetObject());
37 if (!explosive)
38 return false;
39
40 if (explosive.IsRuined() || !explosive.GetArmed() || !explosive.CanBeDisarmed())
41 return false;
42
43 if (explosive.GetAttachmentByType(KitchenTimer) || explosive.GetAttachmentByType(AlarmClock_ColorBase))
44 return false;
45
47 if (rdt && rdt.IsConnected())
48 {
49 if (explosive != rdt.GetControlledDevice())
50 return false;
51
52 ExplosivesBase controlledDevice = ExplosivesBase.Cast(rdt.GetControlledDevice());
53 if (controlledDevice && !controlledDevice.IsRuined() && controlledDevice.GetArmed())
54 return true;
55 }
56
57 return false;
58 }
Definition AlarmClock.c:2
Definition KitchenTimer.c:2
Definition EntityAI.c:95
Definition RemoteDetonator.c:47

◆ ActionDisarmExplosiveWithRemoteDetonator()

ActionDisarmExplosiveWithRemoteDetonatorCB ActionDisarmExplosiveCB ActionDisarmExplosiveWithRemoteDetonator ( )
12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
15 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
16 m_FullBody = true;
17 m_Text = "#disarm";
18 }
int m_CommandUID
Definition ActionBase.c:31
int m_StanceMask
Definition ActionBase.c:33
Definition ActionDisarmExplosiveWithRemoteDetonator.c:2
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Используется в ActionConstructor::RegisterActions() и RemoteDetonatorTrigger::SetActions().

◆ CanBeSetFromInventory()

override bool CanBeSetFromInventory ( )
27 {
28 return true;
29 }

◆ CreateActionComponent()

override void CreateActionComponent ( )
12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
15 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;

Перекрестные ссылки m_CommandUID и m_StanceMask.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
21 {
22 m_ConditionItem = new CCINonRuined();
23 m_ConditionTarget = new CCTNonRuined();
24 }
Definition CCINonRuined.c:2
Definition CCTNonRuined.c:2

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)

claymore has integrated detonator

refresh IK, item changed

61 {
62 ExplosivesBase explosive = ExplosivesBase.Cast(action_data.m_Target.GetObject());
63 ItemBase detonator = ItemBase.Cast(action_data.m_MainItem);
64
65 explosive.OnBeforeDisarm();
66
68 if (explosive.IsInherited(ClaymoreMine))
69 {
70 explosive.Disarm();
71 explosive.SetTakeable(true);
72 detonator.Delete();
73 return;
74 }
75
77 MiscGameplayFunctions.TurnItemIntoItemEx(action_data.m_Player, lambda);
79 action_data.m_Player.GetItemAccessor().OnItemInHandsChanged();
80 }
Definition ClaymoreMine.c:2
Definition InventoryItem.c:731
Definition RemoteDetonator.c:312