DayZ 1.24
Loading...
Searching...
No Matches
ActionCoverHeadSelf.c
Go to the documentation of this file.
8
10{
12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_COVERHEAD_SELF;
15 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_PRONE;
16 //m_Animation = "INJECTEPIPENS";
18 m_Text = "#put_on_head";
19 }
20
26
27 override bool HasTarget()
28 {
29 return false;
30 }
31
32 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
33 {
35 return false;
36
37 return true;
38 }
39
41 {
43 if (Class.CastTo(new_item, action_data.m_Player.GetInventory().CreateAttachmentEx("BurlapSackCover", InventorySlots.HEADGEAR)))
44 {
45 MiscGameplayFunctions.TransferItemProperties(action_data.m_MainItem, new_item, true, false, true);
46 action_data.m_MainItem.Delete();
47 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
48 }
49 }
50
51
53 {
54 if (player.GetInventory().FindAttachment(InventorySlots.HEADGEAR))
55 return true;
56 return false;
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
int m_StanceMask
Definition ActionBase.c:53
ActionData m_ActionData
override void CreateActionComponent()
bool IsWearingHeadgear(PlayerBase player)
override bool HasTarget()
override void OnFinishProgressServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void CreateConditionComponents()
ref CABase m_ActionComponent
Definition ActionBase.c:30
Super root of all classes in Enforce script.
Definition EnScript.c:11
provides access to slot configuration
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.