Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionwashhandswaterone.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAInteractLoop(UATimeSpent.WASH_HANDS);
6  }
7 };
8 
9 class ActionWashHandsWaterOne extends ActionInteractLoopBase
10 {
11  void ActionWashHandsWaterOne()
12  {
13  m_CallbackClass = ActionWashHandsWaterOneCB;
14  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_WASHHANDSPOND;
15  m_FullBody = true;
16  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
17  m_Text = "#wash_hands";
18  }
19 
20  override void CreateConditionComponents()
21  {
24  }
25 
26  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
27  {
28  // Other conditions are in CCTWaterSurface
29  return ( GetGame().IsMultiplayer() && GetGame().IsServer() ) || ( player.HasBloodyHands() && !player.GetItemInHands() && !player.GetItemOnSlot("Gloves") );
30  }
31 
32  override void OnEndServer( ActionData action_data )
33  {
34  if (action_data.m_State == UA_FINISHED)
35  {
36  PluginLifespan module_lifespan = PluginLifespan.Cast( GetPlugin( PluginLifespan ) );
37  module_lifespan.UpdateBloodyHandsVisibility( action_data.m_Player, false );
38  }
39  }
40 };
ItemBase
Definition: inventoryitem.c:730
GetGame
proto native CGame GetGame()
CCTWaterSurface
Definition: cctwatersurface.c:1
ActionInteractLoopBaseCB
Definition: actioninteractloopbase.c:1
CCINone
Definition: ccinone.c:1
UAWaterType
Definition: actionconstants.c:144
UAMaxDistances
Definition: actionconstants.c:104
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
UA_FINISHED
const int UA_FINISHED
Definition: constants.c:436
OnEndServer
void OnEndServer(ActionData action_data)
Definition: actionbase.c:1039
ActionInteractLoopBase
Definition: actioninteractloopbase.c:37
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
ActionWashHandsWaterOneCB
Definition: actionwashhandswaterone.c:1
PluginLifespan
void PluginLifespan()
Definition: pluginlifespan.c:45
CreateConditionComponents
void CreateConditionComponents()
Definition: actionbase.c:218
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
ActionCondition
protected bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actionbase.c:372
UATimeSpent
Definition: actionconstants.c:26
CAInteractLoop
Definition: cainteractloop.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53