DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
ActionWashHandsItemContinuous.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_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
27 {
30 }
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
45 override void OnFinishProgressServer(ActionData action_data)
46 {
47 PluginLifespan module_lifespan = PluginLifespan.Cast( GetPlugin( PluginLifespan ) );
48 module_lifespan.UpdateBloodyHandsVisibility( action_data.m_Player, false );
49 action_data.m_MainItem.AddQuantity( -action_data.m_MainItem.GetDisinfectQuantity(), false );
50 }
51};
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 bool m_FullBody
Definition ActionBase.c:52
protected int m_StanceMask
Definition ActionBase.c:53
class ActionTargets ActionTarget
void PluginLifespan()
PluginBase GetPlugin(typename plugin_type)
protected ActionData m_ActionData
ItemBase m_MainItem
Definition ActionBase.c:28
PlayerBase m_Player
Definition ActionBase.c:33
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void OnFinishProgressServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
protected int m_CommandUIDProne
const float WASH_HANDS
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602