DayZ 1.24
Loading...
Searching...
No Matches
ActionArmExplosive.c
Go to the documentation of this file.
2{
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
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
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}
ActionArmExplosiveCB ActionContinuousBaseCB ActionArmExplosive()
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
void CreateConditionComponents()
Definition ActionBase.c:196
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
bool HasProgress()
For UI: hiding of progress bar.
Definition ActionBase.c:216
class DayZCreatureAnimInterface RegisterAnimationEvent(string event_name, string function_name)
EffectSound m_Sound
override void CreateActionComponent()
override void InitActionComponent()
ActionData m_ActionData
void OnFinishProgressServer(ActionData action_data)
ref CABase m_ActionComponent
Definition ActionBase.c:30
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
const float DEFAULT
const float EXPLOSIVE_ARM
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
const int UA_IN_CRAFTING
Definition constants.c:453