Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actiondrink.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousQuantityEdible(UAQuantityConsumed.DRINK,UATimeSpent.DEFAULT);
6  }
7 };
8 
10 {
11  void ActionDrink()
12  {
13  m_CallbackClass = ActionDrinkCB;
14  m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_DRINK;
15  m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_DRINK;
16  m_Text = "#drink";
17  }
18 
19  override void CreateConditionComponents()
20  {
23  }
24 
25  override bool IsDrink()
26  {
27  return true;
28  }
29 
30  override bool HasTarget()
31  {
32  return false;
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 };
ItemBase
Definition: inventoryitem.c:730
UAQuantityConsumed
Definition: actionconstants.c:3
ActionDrinkCB
Definition: actiondrink.c:1
ActionDrink
Definition: actiondrink.c:9
ActionConsume
Definition: actionconsume.c:9
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
CCTSelf
Definition: cctself.c:1
CAContinuousQuantityEdible
Definition: cacontinuousquantityedible.c:1
UATimeSpent
Definition: actionconstants.c:26
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
CCINotRuinedAndEmpty
Definition: ccinotruinedandempty.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56