DayZ
1.24
Loading...
Searching...
No Matches
ActionEatFruit.c
Go to the documentation of this file.
1
class
ActionEatFruitCB
:
ActionContinuousBaseCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
m_ActionData
.
m_ActionComponent
=
new
CAContinuousQuantityEdible
(
UAQuantityConsumed
.
EAT_NORMAL
,
UATimeSpent
.
DEFAULT
);
6
}
7
};
8
9
class
ActionEatFruit
:
ActionEatBig
10
{
11
void
ActionEatFruit
()
12
{
13
m_CallbackClass
=
ActionEatFruitCB
;
14
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_EAT;
15
m_CommandUIDProne
=
DayZPlayerConstants
.CMD_ACTIONFB_EAT;
16
}
17
18
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
)
19
{
20
if
(!
super
.ActionCondition(
player
,
target
,
item
))
21
return
false
;
22
Edible_Base
food_item
;
23
24
if
(
Class
.
CastTo
(
food_item
,
item
))
25
{
26
if
(
food_item
.IsFruit())
27
return
true
;
28
}
29
30
return
false
;
31
}
32
}
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
AnimatedActionBase.c:3
ActionContinuousBaseCB
Definition
ActionContinuousBase.c:2
ActionData::m_ActionComponent
ref CABase m_ActionComponent
Definition
ActionBase.c:30
ActionEatBig
Definition
ActionEat.c:10
ActionEatFruitCB
Definition
ActionEatFruit.c:2
ActionEatFruitCB::CreateActionComponent
override void CreateActionComponent()
Definition
ActionEatFruit.c:3
ActionEatFruit
Definition
ActionEatFruit.c:10
ActionEatFruit::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionEatFruit.c:18
ActionEatFruit::ActionEatFruit
void ActionEatFruit()
Definition
ActionEatFruit.c:11
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
AnimatedActionBase.c:122
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
AnimatedActionBase.c:124
AnimatedActionBase::m_CommandUIDProne
int m_CommandUIDProne
Definition
AnimatedActionBase.c:123
CAContinuousQuantityEdible
Definition
CAContinuousQuantityEdible.c:2
Class
Super root of all classes in Enforce script.
Definition
EnScript.c:11
Edible_Base
Definition
Edible_Base.c:2
ItemBase
Definition
InventoryItem.c:697
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
UAQuantityConsumed
Definition
ActionConstants.c:4
UAQuantityConsumed::EAT_NORMAL
const float EAT_NORMAL
Definition
ActionConstants.c:8
UATimeSpent
Definition
ActionConstants.c:27
UATimeSpent::DEFAULT
const float DEFAULT
Definition
ActionConstants.c:28
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:597
Class::CastTo
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
scripts
4_World
Classes
UserActionsComponent
Actions
Continuous
ActionEatFruit.c
Generated by
1.10.0