Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
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 {
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() && !item.GetIsFrozen());
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_Player.ClearBloodyHandsPenaltyChancePerAgent(eAgents.SALMONELLA);
50 action_data.m_MainItem.AddQuantity( -action_data.m_MainItem.GetDisinfectQuantity(), false );
51 }
52};
ActionData m_ActionData
int m_StanceMask
Definition actionbase.c:62
string m_Text
Definition actionbase.c:58
ref CCIBase m_ConditionItem
Definition actionbase.c:64
bool m_FullBody
Definition actionbase.c:61
ref CCTBase m_ConditionTarget
Definition actionbase.c:65
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602
eAgents
Definition eagents.c:3
void PluginLifespan()
PluginBase GetPlugin(typename plugin_type)