DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
ActionEat.c
Go to the documentation of this file.
2{
3 override void CreateActionComponent()
4 {
6 }
7};
8
10{
12 {
14 //m_Sound = "EatingSoft_0";
15 m_Text = "#eat";
16 }
17
19 {
22 }
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
43 override void OnEndServer( ActionData action_data )
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 {
49 action_data.m_Player.SetBloodyHandsPenalty();
50 }
51 }
52};
53
54
55//-------------- Action Eat
57{
58 override void CreateActionComponent()
59 {
61 }
62};
63
65{
66 void ActionEat()
67 {
69 }
70
71
72};
73
74//-------------- Action Eat Small
76{
77 override void CreateActionComponent()
78 {
80 }
81};
82
84{
86 {
88 }
89};
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
protected string m_Text
Definition ActionBase.c:49
class ActionTargets ActionTarget
eBloodyHandsTypes
protected ActionData m_ActionData
PlayerBase m_Player
Definition ActionBase.c:33
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void CreateActionComponent()
Definition ActionEat.c:3
override void OnEndServer(ActionData action_data)
Definition ActionEat.c:43
override void CreateConditionComponents()
Definition ActionEat.c:18
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionEat.c:35
override int IsEat()
Definition ActionEat.c:24
override bool HasTarget()
Definition ActionEat.c:29
void ActionEatBig()
Definition ActionEat.c:11
override void CreateActionComponent()
Definition ActionEat.c:58
void ActionEat()
Definition ActionEat.c:66
override void CreateActionComponent()
Definition ActionEat.c:77
void ActionEatSmall()
Definition ActionEat.c:85
override float GetProgress(ActionData action_data)
provides access to slot configuration
const float EAT_NORMAL
const float EAT_SMALL
const float DEFAULT