Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionarmexplosive.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.EXPLOSIVE_ARM);
6  }
7 
8  override void InitActionComponent()
9  {
10  super.InitActionComponent();
11 
12  RegisterAnimationEvent("CraftingAction", UA_IN_CRAFTING);
13  }
14 }
15 
17 {
19  {
20  m_CallbackClass = ActionArmExplosiveCB;
21  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
22  m_FullBody = true;
24  m_Text = "#STR_ArmExplosive";
25  m_Sound = "craft_universal_0";
26  }
27 
28  override void CreateConditionComponents()
29  {
32  }
33 
34  override typename GetInputType()
35  {
37  }
38 
39  override bool HasProgress()
40  {
41  return true;
42  }
43 
44  override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
45  {
46  if (target.GetParent())
47  return false;
48 
49  ItemBase targetItem = ItemBase.Cast(target.GetObject());
50  if (targetItem && targetItem.IsBeingPlaced())
51  return false;
52 
53  ExplosivesBase explosive = ExplosivesBase.Cast(target.GetObject());
54 
55  return explosive && !explosive.GetArmed();
56  }
57 
58  override void OnFinishProgressServer(ActionData action_data)
59  {
60  super.OnFinishProgressServer(action_data);
61 
62  ExplosivesBase explosive = ExplosivesBase.Cast(action_data.m_Target.GetObject());
63  if (explosive)
64  explosive.OnPlacementComplete(action_data.m_Player, explosive.GetPosition(), action_data.m_Player.GetOrientation());
65  }
66 }
ItemBase
Definition: inventoryitem.c:730
m_Sound
EffectSound m_Sound
Definition: hungersoundhandler.c:18
CCINotPresent
Definition: ccinotpresent.c:1
CAContinuousTime
Definition: cacontinuoustime.c:1
GetInputType
override GetInputType()
Definition: actionarmexplosive.c:34
ContinuousInteractActionInput
Definition: actioninput.c:521
UASoftSkillsWeight
Definition: actionconstants.c:118
HasProgress
override bool HasProgress()
Definition: actionarmexplosive.c:39
ActionArmExplosiveCB
Definition: actionarmexplosive.c:1
UAMaxDistances
Definition: actionconstants.c:104
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actionarmexplosive.c:44
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
ExplosivesBase
void ExplosivesBase()
Definition: explosivesbase.c:40
CreateConditionComponents
override void CreateConditionComponents()
Definition: actionarmexplosive.c:28
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
ActionArmExplosive
ActionArmExplosiveCB ActionContinuousBaseCB ActionArmExplosive()
Definition: actionarmexplosive.c:18
RegisterAnimationEvent
class DayZCreatureAnimInterface RegisterAnimationEvent(string event_name, string function_name)
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition: actionarmexplosive.c:58
CCTNonRuined
Definition: cctnonruined.c:1
UATimeSpent
Definition: actionconstants.c:26
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
ActionContinuousBase
Definition: actioncontinuousbase.c:132
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
UA_IN_CRAFTING
const int UA_IN_CRAFTING
Definition: constants.c:453
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68