DayZ 1.24
Loading...
Searching...
No Matches
ActionEat.c
Go to the documentation of this file.
8
10{
12 {
14 //m_Sound = "EatingSoft_0";
15 m_Text = "#eat";
16 }
17
23
24 override int IsEat()
25 {
26 return true;
27 }
28
29 override bool HasTarget()
30 {
31 return false;
32 }
33
34
35 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
36 {
37 if (!super.ActionCondition(player, target, item))
38 return false;
39
40 return player.CanEatAndDrink();
41 }
42
44 {
45 super.OnEndServer(action_data);
46
47 if (action_data.m_Player.HasBloodyHandsEx() == eBloodyHandsTypes.SALMONELA && !action_data.m_Player.GetInventory().FindAttachment(InventorySlots.GLOVES) && GetProgress(action_data) > 0)
48 action_data.m_Player.SetBloodyHandsPenalty();
49 }
50};
51
52
53//-------------- Action Eat
61
63{
64 void ActionEat()
65 {
67 }
68
69
70};
71
72//-------------- Action Eat Small
80
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
eBloodyHandsTypes
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void CreateActionComponent()
Definition ActionEat.c:3
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionEat.c:35
override void OnEndServer(ActionData action_data)
Definition ActionEat.c:43
void ActionEatBig()
Definition ActionEat.c:11
override int IsEat()
Definition ActionEat.c:24
override bool HasTarget()
Definition ActionEat.c:29
override void CreateConditionComponents()
Definition ActionEat.c:18
override void CreateActionComponent()
Definition ActionEat.c:56
void ActionEat()
Definition ActionEat.c:64
override void CreateActionComponent()
Definition ActionEat.c:75
void ActionEatSmall()
Definition ActionEat.c:83
override float GetProgress(ActionData action_data)
provides access to slot configuration
const float EAT_SMALL
const float EAT_NORMAL
const float DEFAULT