DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
ActionCoverHeadSelf.c
Go to the documentation of this file.
2{
3 override void CreateActionComponent()
4 {
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";
18 m_Text = "#put_on_head";
19 }
20
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 //setaperture will be called from here, or from statemachine
43 //GetGame().GetWorld().SetAperture(10000);
44 ItemBase new_item = ItemBase.Cast(action_data.m_Player.GetInventory().CreateInInventory("BurlapSackCover"));
45 if( new_item )
46 {
47 MiscGameplayFunctions.TransferItemProperties(action_data.m_MainItem,new_item,true,false,true);
48 action_data.m_MainItem.Delete();
49 action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
50 }
51 }
52
53
55 {
56 if ( player.GetInventory().FindAttachment(InventorySlots.HEADGEAR) )
57 {
58 return true;
59 }
60 return false;
61 }
62};
protected float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
protected string m_Text
Definition ActionBase.c:49
protected int m_StanceMask
Definition ActionBase.c:53
class ActionTargets ActionTarget
protected ActionData m_ActionData
override void CreateActionComponent()
override void OnFinishProgressServer(ActionData action_data)
bool IsWearingHeadgear(PlayerBase player)
override void CreateConditionComponents()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool HasTarget()
ItemBase m_MainItem
Definition ActionBase.c:28
PlayerBase m_Player
Definition ActionBase.c:33
ref CABase m_ActionComponent
Definition ActionBase.c:30
provides access to slot configuration
const float COVER_HEAD
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602