DayZ 1.24
Loading...
Searching...
No Matches
ActionForceConsume.c File Reference

Go to the source code of this file.

Classes

class  ActionForceConsumeCB
 

Functions

ActionForceConsumeCB ActionContinuousBaseCB ActionForceConsume ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override void OnEndServer (ActionData action_data)
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 

Function Documentation

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

Definition at line 33 of file ActionForceConsume.c.

34 {
35 if (!super.ActionCondition(player, target, item))
36 return false;
37
38 return item.GetQuantity() > item.GetQuantityMin();
39 }

◆ ActionForceConsume()

Definition at line 1 of file ActionForceConsume.c.

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 }
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

◆ CreateActionComponent()

override void ActionForceConsume::CreateActionComponent ( )

Definition at line 12 of file ActionForceConsume.c.

12 {
13 m_CallbackClass = ActionForceConsumeCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_FORCEFEED;
15 m_StanceMask = DayZPlayerConstants.STANCEIDX_ERECT | DayZPlayerConstants.STANCEIDX_CROUCH;

References m_FullBody, m_StanceMask, and m_Text.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

Definition at line 20 of file ActionForceConsume.c.

21 {
24 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
Definition CCTMan.c:2
const float DEFAULT

References UAMaxDistances::DEFAULT, m_ConditionItem, and m_ConditionTarget.

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)

Definition at line 26 of file ActionForceConsume.c.

27 {
28 if (action_data.m_MainItem && (action_data.m_MainItem.GetQuantity() <= 0.01))
29 action_data.m_MainItem.SetQuantity(0);
30
31 }