Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionwashhandsitemcontinuous.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.WASH_HANDS);
6  }
7 };
8 
10 {
12  {
13  m_CallbackClass = ActionWashHandsItemContinuousCB;
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 
26  override void CreateConditionComponents()
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 };
ItemBase
Definition: inventoryitem.c:730
ActionWashHandsItemContinuousCB
Definition: actionwashhandsitemcontinuous.c:1
CAContinuousTime
Definition: cacontinuoustime.c:1
GetPlugin
PluginBase GetPlugin(typename plugin_type)
Definition: pluginmanager.c:316
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
ActionWashHandsItemContinuous
Definition: actionwashhandsitemcontinuous.c:9
PluginLifespan
void PluginLifespan()
Definition: pluginlifespan.c:45
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
CCTSelf
Definition: cctself.c:1
UATimeSpent
Definition: actionconstants.c:26
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
CCINotRuinedAndEmpty
Definition: ccinotruinedandempty.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
ActionContinuousBase
Definition: actioncontinuousbase.c:132
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53