DayZ 1.24
Loading...
Searching...
No Matches
ActionCoverHeadTarget.c
Go to the documentation of this file.
8
10{
12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_COVERHEAD_TARGET;
15 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
16 //m_Animation = "INJECTEPIPENS";
18 m_Text = "#put_on_targets_head";
19 }
20
27
28 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
29 {
31 Class.CastTo(targetPlayer, target.GetObject());
33 return true;
34
35 return false;
36 }
37
39 {
41
42 if (Class.CastTo(ntarget, action_data.m_Target.GetObject()) && CanReceiveAction(action_data.m_Target))
43 {
45 action_data.m_Player.ServerReplaceItemInHandsWithNewElsewhere(lambda);
46
47 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
48 }
49 }
50
52 {
53 if (player.GetInventory().FindAttachment(InventorySlots.HEADGEAR))
54 return true;
55 return false;
56 }
57};
58
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
bool CanReceiveAction(ActionTarget target)
Definition ActionBase.c:594
int m_StanceMask
Definition ActionBase.c:53
ActionData m_ActionData
override void CreateActionComponent()
override void CreateConditionComponents()
override void OnFinishProgressServer(ActionData action_data)
bool IsWearingHeadgear(PlayerBase player)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
ref CABase m_ActionComponent
Definition ActionBase.c:30
Definition CCTMan.c:2
Super root of all classes in Enforce script.
Definition EnScript.c:11
void CoverHeadOfTargetPlayerLambda(EntityAI old_item, string new_item_type, PlayerBase player)
InventoryLocation.
provides access to slot configuration
const float DEFAULT
const float COVER_HEAD
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.