DayZ 1.24
Loading...
Searching...
No Matches
ActionUncoverHeadTarget.c
Go to the documentation of this file.
8
10{
12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
17 m_Text = "#uncover_players_head";
18 }
19
25
26 override typename GetInputType()
27 {
29 }
30
31 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
32 {
34 if (Class.CastTo(targetPlayer, target.GetObject()))
35 {
37 return true;
38 }
39 return false;
40 }
41
43 {
44 PlayerBase targetPlayer = PlayerBase.Cast(action_data.m_Target.GetObject());
45 if (CanReceiveAction(action_data.m_Target))
46 UncoverHead(PlayerBase.Cast(action_data.m_Target.GetObject()), action_data.m_Player);
47 }
48
50 {
52 Class.CastTo(attachment, player.GetInventory().FindAttachment(InventorySlots.HEADGEAR));
53 if (attachment && attachment.GetType() == "BurlapSackCover")
54 return true;
55 return false;
56 }
57};
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
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
ref CABase m_ActionComponent
Definition ActionBase.c:30
void UncoverHead(PlayerBase target, PlayerBase source)
override void OnFinishProgressServer(ActionData action_data)
bool IsWearingBurlap(PlayerBase player)
override void CreateConditionComponents()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition CCTMan.c:2
Super root of all classes in Enforce script.
Definition EnScript.c:11
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.