DayZ 1.24
Loading...
Searching...
No Matches
ActionUncoverHeadSelf.c File Reference

Go to the source code of this file.

Classes

class  ActionUncoverHeadSelfCB
 
class  ActionUncoverHeadBase
 

Functions

ActionUncoverHeadBase ActionContinuousBase ActionUncoverHeadSelf ()
 
void UncoverHead (PlayerBase target, PlayerBase source)
 
override void CreateConditionComponents ()
 
override bool HasTarget ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 
bool IsWearingBurlap (PlayerBase player)
 

Function Documentation

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

Definition at line 66 of file ActionUncoverHeadSelf.c.

67 {
69 return true;
70
71 return false;
72 }
bool IsWearingBurlap(PlayerBase player)

References IsWearingBurlap().

◆ ActionUncoverHeadSelf()

ActionUncoverHeadBase ActionContinuousBase ActionUncoverHeadSelf ( )

Definition at line 1 of file ActionUncoverHeadSelf.c.

47 {
48 m_CallbackClass = ActionUncoverHeadSelfCB;
49 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_COVERHEAD_SELF;
50 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_PRONE;
51
52 m_Text = "#uncover_head";
53 }
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

Referenced by ActionConstructor::RegisterActions(), and ManBase::SetActions().

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

Definition at line 55 of file ActionUncoverHeadSelf.c.

56 {
59 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ HasTarget()

override bool HasTarget ( )

Definition at line 61 of file ActionUncoverHeadSelf.c.

62 {
63 return false;
64 }

◆ IsWearingBurlap()

bool IsWearingBurlap ( PlayerBase player)

Definition at line 80 of file ActionUncoverHeadSelf.c.

81 {
83 Class.CastTo(attachment, player.GetInventory().FindAttachment(InventorySlots.HEADGEAR));
84 if (attachment && attachment.IsInherited(BurlapSackCover))
85 return true;
86 return false;
87 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
provides access to slot configuration
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo().

Referenced by ActionCondition().

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)

Definition at line 74 of file ActionUncoverHeadSelf.c.

75 {
76 UncoverHead(action_data.m_Player, action_data.m_Player);
77 }
void UncoverHead(PlayerBase target, PlayerBase source)

References ActionUncoverHeadBase::UncoverHead().

◆ UncoverHead()

void ActionUncoverHeadSelf::UncoverHead ( PlayerBase target,
PlayerBase source )

Definition at line 47 of file ActionUncoverHeadSelf.c.

47 {
48 m_CallbackClass = ActionUncoverHeadSelfCB;
49 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_COVERHEAD_SELF;
50 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_PRONE;
51
52 m_Text = "#uncover_head";
53 }
54
55 override void CreateConditionComponents()
56 {
59 }
60
61 override bool HasTarget()
62 {
63 return false;
64 }
65
66 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
67 {
69 return true;
70
71 return false;
72 }
73
75 {
override void OnFinishProgressServer(ActionData action_data)
override void CreateConditionComponents()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool HasTarget()

References m_StanceMask, and m_Text.