Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionwashhandsitem.c
Go to the documentation of this file.
1
class
ActionWashHandsItem
:
ActionSingleUseBase
2
{
3
protected
const
float
WASH_HANDS_AMOUNT
= 250;
//ml
4
5
void
ActionWashHandsItem
()
6
{
7
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_CLEANHANDSBOTTLE;
8
m_CommandUIDProne
=
DayZPlayerConstants
.CMD_ACTIONFB_CLEANHANDSBOTTLE;
9
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_CROUCH |
DayZPlayerConstants
.STANCEMASK_ERECT;
10
m_Text
=
"#wash_hands"
;
11
}
12
13
override
void
CreateConditionComponents
()
14
{
15
m_ConditionItem
=
new
CCINotRuinedAndEmpty
;
16
m_ConditionTarget
=
new
CCTNone
;
17
}
18
19
override
bool
HasTarget
()
20
{
21
return
false
;
22
}
23
24
override
bool
HasProneException
()
25
{
26
return
true
;
27
}
28
29
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
30
{
31
//Print(item.GetQuantity());
32
if
( player.GetItemOnSlot(
"Gloves"
) )
33
return
false
;
34
35
return
player.HasBloodyHands() && ( item.GetQuantity() >= item.GetDisinfectQuantity() );
36
}
37
38
override
void
OnEndServer
(
ActionData
action_data )
39
{
40
super.OnEndServer(action_data);
41
42
if
(action_data.m_State !=
UA_CANCEL
)
43
{
44
PluginLifespan
module_lifespan =
PluginLifespan
.Cast(
GetPlugin
(
PluginLifespan
) );
45
module_lifespan.UpdateBloodyHandsVisibility( action_data.m_Player,
false
);
46
action_data.m_Player.ClearBloodyHandsPenaltyChancePerAgent(
eAgents
.SALMONELLA);
47
action_data.m_MainItem.AddQuantity( -action_data.m_MainItem.GetDisinfectQuantity(),
false
);
48
}
49
}
50
};
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionTarget
class ActionTargets ActionTarget
ActionBase::m_Text
string m_Text
Definition
actionbase.c:64
ActionBase::m_ConditionItem
ref CCIBase m_ConditionItem
Definition
actionbase.c:70
ActionBase::m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
actionbase.c:71
ActionBase::m_StanceMask
int m_StanceMask
Definition
actionbase.c:68
ActionSingleUseBase::ActionSingleUseBase
void ActionSingleUseBase()
Definition
actionsingleusebase.c:31
ActionWashHandsItem::OnEndServer
override void OnEndServer(ActionData action_data)
Definition
actionwashhandsitem.c:38
ActionWashHandsItem::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionwashhandsitem.c:13
ActionWashHandsItem::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionwashhandsitem.c:29
ActionWashHandsItem::ActionWashHandsItem
void ActionWashHandsItem()
Definition
actionwashhandsitem.c:5
ActionWashHandsItem::HasTarget
override bool HasTarget()
Definition
actionwashhandsitem.c:19
ActionWashHandsItem::HasProneException
override bool HasProneException()
Definition
actionwashhandsitem.c:24
ActionWashHandsItem::WASH_HANDS_AMOUNT
const float WASH_HANDS_AMOUNT
Definition
actionwashhandsitem.c:3
AnimatedActionBase::m_CommandUIDProne
int m_CommandUIDProne
Definition
animatedactionbase.c:144
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
animatedactionbase.c:143
CCINotRuinedAndEmpty
Definition
ccinotruinedandempty.c:2
CCTNone
Definition
cctnone.c:2
ItemBase
Definition
inventoryitem.c:742
PlayerBase
Definition
playerbaseclient.c:2
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
eAgents
eAgents
Definition
eagents.c:3
UA_CANCEL
const int UA_CANCEL
Definition
constants.c:470
PluginLifespan
void PluginLifespan()
Definition
pluginlifespan.c:45
GetPlugin
PluginBase GetPlugin(typename plugin_type)
Definition
pluginmanager.c:325
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
singleuse
actionwashhandsitem.c
Generated by
1.17.0