DayZ 1.24
Loading...
Searching...
No Matches
ActionConsume Class Reference
Inheritance diagram for ActionConsume:
[legend]
Collaboration diagram for ActionConsume:
[legend]

Private Member Functions

void ActionConsume ()
 
override bool HasProneException ()
 
override bool HasTarget ()
 
override void CreateConditionComponents ()
 
override void OnEndServer (ActionData action_data)
 
- Private Member Functions inherited from ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

Detailed Description

Definition at line 9 of file ActionConsume.c.

Constructor & Destructor Documentation

◆ ActionConsume()

void ActionConsume::ActionConsume ( )
inlineprivate

Member Function Documentation

◆ CreateConditionComponents()

override void ActionConsume::CreateConditionComponents ( )
inlineprivate

Definition at line 30 of file ActionConsume.c.

31 {
34 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ HasProneException()

override bool ActionConsume::HasProneException ( )
inlineprivate

Definition at line 20 of file ActionConsume.c.

21 {
22 return true;
23 }

◆ HasTarget()

override bool ActionConsume::HasTarget ( )
inlineprivate

Definition at line 25 of file ActionConsume.c.

26 {
27 return false;
28 }

◆ OnEndServer()

override void ActionConsume::OnEndServer ( ActionData action_data)
inlineprivate

Definition at line 36 of file ActionConsume.c.

37 {
38 ItemBase item = action_data.m_MainItem;
39
40 if (item && item.GetQuantity() <= 0.01)
41 item.SetQuantity(0);
42 else if (item && GetProgress(action_data) > 0)
43 {
44 // we don't want to inject an agent into an empty container
45 PlayerBase player = action_data.m_Player;
46 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(GetPlugin(PluginTransmissionAgents));
47 plugin.TransmitAgents(player, item, AGT_UACTION_TO_ITEM);
48 }
49 }
PluginBase GetPlugin(typename plugin_type)
override float GetProgress(ActionData action_data)
const int AGT_UACTION_TO_ITEM
Definition constants.c:474

References AGT_UACTION_TO_ITEM, GetPlugin(), and AnimatedActionBase::GetProgress().


The documentation for this class was generated from the following file: