DayZ 1.24
Loading...
Searching...
No Matches
ActionWashHandsItem Class Reference
Inheritance diagram for ActionWashHandsItem:
[legend]
Collaboration diagram for ActionWashHandsItem:
[legend]

Protected Member Functions

void ActionWashHandsItem ()
 
override void CreateConditionComponents ()
 
override bool HasTarget ()
 
override bool HasProneException ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnEndServer (ActionData action_data)
 

Protected Attributes

const float WASH_HANDS_AMOUNT = 250
 

Detailed Description

Definition at line 1 of file ActionWashHandsItem.c.

Constructor & Destructor Documentation

◆ ActionWashHandsItem()

void ActionWashHandsItem::ActionWashHandsItem ( )
inlineprotected

Definition at line 5 of file ActionWashHandsItem.c.

6 {
7 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_CLEANHANDSBOTTLE;
8 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_CLEANHANDSBOTTLE;
9 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
10 m_Text = "#wash_hands";
11 }
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References AnimatedActionBase::m_CommandUID, AnimatedActionBase::m_CommandUIDProne, m_StanceMask, and m_Text.

Member Function Documentation

◆ ActionCondition()

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

Definition at line 29 of file ActionWashHandsItem.c.

30 {
31 //Print(item.GetQuantity());
32 if (player.GetItemOnSlot("Gloves"))
33 return false;
34
35 return player.HasBloodyHands() && (item.GetQuantity() >= item.GetDisinfectQuantity());
36 }

◆ CreateConditionComponents()

override void ActionWashHandsItem::CreateConditionComponents ( )
inlineprotected

Definition at line 13 of file ActionWashHandsItem.c.

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

References m_ConditionItem, and m_ConditionTarget.

◆ HasProneException()

override bool ActionWashHandsItem::HasProneException ( )
inlineprotected

Definition at line 24 of file ActionWashHandsItem.c.

25 {
26 return true;
27 }

◆ HasTarget()

override bool ActionWashHandsItem::HasTarget ( )
inlineprotected

Definition at line 19 of file ActionWashHandsItem.c.

20 {
21 return false;
22 }

◆ OnEndServer()

override void ActionWashHandsItem::OnEndServer ( ActionData action_data)
inlineprotected

Definition at line 38 of file ActionWashHandsItem.c.

39 {
40 if (action_data.m_State != UA_INTERRUPT)
41 {
43 module_lifespan.UpdateBloodyHandsVisibility(action_data.m_Player, false);
44 action_data.m_MainItem.AddQuantity(-action_data.m_MainItem.GetDisinfectQuantity(), false);
45 }
46 }
void PluginLifespan()
PluginBase GetPlugin(typename plugin_type)
const int UA_INTERRUPT
Definition constants.c:438

References GetPlugin(), PluginLifespan(), and UA_INTERRUPT.

Member Data Documentation

◆ WASH_HANDS_AMOUNT

const float ActionWashHandsItem::WASH_HANDS_AMOUNT = 250
protected

Definition at line 3 of file ActionWashHandsItem.c.


The documentation for this class was generated from the following file: