Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
actioncoverheadself.c
Go to the documentation of this file.
2{
3 override void CreateActionComponent()
4 {
5 m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.COVER_HEAD);
6 }
7};
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";
17 m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_LOW;
18 m_Text = "#put_on_head";
19 }
20
21 override void CreateConditionComponents()
22 {
25 }
26
27 override bool HasTarget()
28 {
29 return false;
30 }
31
32 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
33 {
34 if (IsWearingHeadgear(player))
35 return false;
36
37 return true;
38 }
39
40 override void OnFinishProgressServer( ActionData action_data )
41 {
42 ItemBase new_item;
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 }
48 }
49
50
51 bool IsWearingHeadgear( PlayerBase player )
52 {
53 if (player.GetInventory().FindAttachment(InventorySlots.HEADGEAR))
54 {
55 return true;
56 }
57 return false;
58 }
59};
ActionData m_ActionData
float m_SpecialtyWeight
Definition actionbase.c:77
int m_StanceMask
Definition actionbase.c:62
string m_Text
Definition actionbase.c:58
ref CCIBase m_ConditionItem
Definition actionbase.c:64
ref CCTBase m_ConditionTarget
Definition actionbase.c:65
Super root of all classes in Enforce script.
Definition enscript.c:11
provides access to slot configuration
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602