Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actioneatcan.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousQuantityEdible(UAQuantityConsumed.EAT_BIG, UATimeSpent.DEFAULT);
6  }
7 };
8 
9 
11 {
12  void ActionEatCan()
13  {
14  m_CallbackClass = ActionEatCanCB;
15  }
16 
17  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
18  {
19  return super.ActionCondition(player, target, item);
20  /*
21  //if staging for cans is introduced
22  if ( item && item.IsOpen() )
23  {
24  return true;
25  }
26  return false;
27  */
28  }
29 };
30 
31 //-----------------SMALL BITES VARIANT-------------------
32 
34 {
35  override void CreateActionComponent()
36  {
37  m_ActionData.m_ActionComponent = new CAContinuousQuantityEdible(UAQuantityConsumed.EAT_SMALL, UATimeSpent.DEFAULT);
38  }
39 };
40 
41 
43 {
44  void ActionEatSmallCan()
45  {
46  m_CallbackClass = ActionEatSmallCanCB;
47  }
48 
49  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
50  {
51  if (!super.ActionCondition(player, target, item))
52  return false;
53  return true;
54  /*
55  //if staging for cans is introduced
56  if ( item && item.IsOpen() )
57  {
58  return true;
59  }
60  return false;
61  */
62  }
63 };
ItemBase
Definition: inventoryitem.c:730
ActionEatCanCB
Definition: actioneatcan.c:1
UAQuantityConsumed
Definition: actionconstants.c:3
ActionEatSmallCan
Definition: actioneatcan.c:42
ActionEatSmallCanCB
Definition: actioneatcan.c:33
ActionEatBig
Definition: actioneat.c:9
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
CAContinuousQuantityEdible
Definition: cacontinuousquantityedible.c:1
UATimeSpent
Definition: actionconstants.c:26
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
ActionEatCan
Definition: actioneatcan.c:10