DayZ 1.24
Loading...
Searching...
No Matches
ActionForceConsume.c
Go to the documentation of this file.
2{
7}
8
9class ActionForceConsume : ActionContinuousBase
10{
12 {
13 m_CallbackClass = ActionForceConsumeCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_FORCEFEED;
15 m_StanceMask = DayZPlayerConstants.STANCEIDX_ERECT | DayZPlayerConstants.STANCEIDX_CROUCH;
16 m_FullBody = true;
17 m_Text = "#feed";
18 }
19
25
27 {
28 if (action_data.m_MainItem && (action_data.m_MainItem.GetQuantity() <= 0.01))
29 action_data.m_MainItem.SetQuantity(0);
30
31 }
32
33 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
34 {
35 if (!super.ActionCondition(player, target, item))
36 return false;
37
38 return item.GetQuantity() > item.GetQuantityMin();
39 }
40}
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
void CreateConditionComponents()
Definition ActionBase.c:196
void OnEndServer(ActionData action_data)
Definition ActionBase.c:962
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionBase.c:350
int m_StanceMask
Definition ActionBase.c:53
ActionForceConsumeCB ActionContinuousBaseCB ActionForceConsume()
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void CreateActionComponent()
Definition CCTMan.c:2
const float DEFAULT
const float DEFAULT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597