DayZ 1.24
Loading...
Searching...
No Matches
ActionWashHandsItemContinuous.c
Go to the documentation of this file.
8
10{
12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_CLEANHANDSBOTTLE;
15 m_FullBody = false;
16 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_CLEANHANDSBOTTLE;
17 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
18 m_Text = "#wash_hands";
19 }
20
21 override bool HasProneException()
22 {
23 return true;
24 }
25
31
32 override bool HasTarget()
33 {
34 return false;
35 }
36
37 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
38 {
39 if (player.GetItemOnSlot("Gloves"))
40 return false;
41 bool result = player.HasBloodyHands() && (item.GetQuantity() >= item.GetDisinfectQuantity() && !player.GetItemOnSlot("Gloves"));
42 return result;
43 }
44
46 {
48 module_lifespan.UpdateBloodyHandsVisibility(action_data.m_Player, false);
49 action_data.m_MainItem.AddQuantity(-action_data.m_MainItem.GetDisinfectQuantity(), false);
50 }
51};
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
int m_StanceMask
Definition ActionBase.c:53
void PluginLifespan()
PluginBase GetPlugin(typename plugin_type)
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void OnFinishProgressServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
const float WASH_HANDS
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597