DayZ 1.24
Loading...
Searching...
No Matches
ActionArmExplosive.c File Reference

Go to the source code of this file.

Classes

class  ActionArmExplosiveCB
 

Functions

ActionArmExplosiveCB ActionContinuousBaseCB ActionArmExplosive ()
 
override void CreateActionComponent ()
 
override void InitActionComponent ()
 
override void CreateConditionComponents ()
 
override GetInputType ()
 
override bool HasProgress ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 

Function Documentation

◆ ActionArmExplosive()

Definition at line 1 of file ActionArmExplosive.c.

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 }
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
float m_SpecialtyWeight
Definition ActionBase.c:68
EffectSound m_Sound
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

Referenced by ActionConstructor::RegisterActions(), and ClaymoreMine::SetActions().

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

Definition at line 44 of file ActionArmExplosive.c.

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 }

◆ CreateActionComponent()

override void ActionArmExplosive::CreateActionComponent ( )

Definition at line 19 of file ActionArmExplosive.c.

19 {
20 m_CallbackClass = ActionArmExplosiveCB;
21 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
22 m_FullBody = true;

References m_FullBody, m_SpecialtyWeight, and UASoftSkillsWeight::PRECISE_LOW.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

Definition at line 28 of file ActionArmExplosive.c.

29 {
32 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
const float DEFAULT

References UAMaxDistances::DEFAULT, m_ConditionItem, and m_ConditionTarget.

◆ GetInputType()

override GetInputType ( )

Definition at line 34 of file ActionArmExplosive.c.

◆ HasProgress()

override bool HasProgress ( )

Definition at line 39 of file ActionArmExplosive.c.

40 {
41 return true;
42 }

◆ InitActionComponent()

override void ActionArmExplosive::InitActionComponent ( )

Definition at line 24 of file ActionArmExplosive.c.

29 {

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)

Definition at line 58 of file ActionArmExplosive.c.

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 }