Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
actioneatfruit.c
Go to the documentation of this file.
2{
3 override void CreateActionComponent()
4 {
5 m_ActionData.m_ActionComponent = new CAContinuousQuantityEdible(UAQuantityConsumed.EAT_NORMAL,UATimeSpent.DEFAULT);
6 }
7};
8
10{
11 void ActionEatFruit()
12 {
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}
int m_CommandUIDProne
Definition actionbase.c:32
int m_CommandUID
Definition actionbase.c:31
ActionData m_ActionData
Super root of all classes in Enforce script.
Definition enscript.c:11
override bool IsFruit()
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602