DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ActionConsume
+ Граф наследования:ActionConsume:

Закрытые члены

void ActionConsume ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool HasProneException ()
 
override bool HasTarget ()
 
override void CreateConditionComponents ()
 
override void OnEndServer (ActionData action_data)
 
- Закрытые члены унаследованные от 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)
 

Подробное описание

Конструктор(ы)

◆ ActionConsume()

void ActionConsume ( )
inlineprivate
12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_EAT;
15 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_EAT;
16
17 m_Text = "#eat";
18 }
string m_Text
Definition ActionBase.c:58
Definition ActionConsume.c:2
int m_CommandUIDProne
Definition AnimatedActionBase.c:144
int m_CommandUID
Definition AnimatedActionBase.c:143
m_CallbackClass
Definition AnimatedActionBase.c:145
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки AnimatedActionBase::m_CallbackClass, AnimatedActionBase::m_CommandUID, AnimatedActionBase::m_CommandUIDProne и ActionBase::m_Text.

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
21 {
22 if (!super.ActionCondition(player, target, item))
23 return false;
24
25 return !item.GetIsFrozen() && player.CanEatAndDrink();
26 }
Definition EntityAI.c:95

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
39 {
42 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINotRuinedAndEmpty.c:2
Definition CCTSelf.c:2

Перекрестные ссылки ActionBase::m_ConditionItem и ActionBase::m_ConditionTarget.

◆ HasProneException()

override bool HasProneException ( )
inlineprivate
29 {
30 return true;
31 }

◆ HasTarget()

override bool HasTarget ( )
inlineprivate
34 {
35 return false;
36 }

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)
inlineprivate
45 {
46 super.OnEndServer(action_data);
47
48 ItemBase item = action_data.m_MainItem;
49
50 if (item && item.GetQuantity() <= 0.01)
51 {
52 item.SetQuantity(0);
53 }
54 else if (item && GetProgress(action_data) > 0)
55 {
56 // we don't want to inject an agent into an empty container
57 PlayerBase player = action_data.m_Player;
58 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(GetPlugin(PluginTransmissionAgents));
59 plugin.TransmitAgents(player, item, AGT_UACTION_TO_ITEM);
60 }
61 }
PluginBase GetPlugin(typename plugin_type)
Definition PluginManager.c:316
override float GetProgress(ActionData action_data)
Definition AnimatedActionBase.c:498
Definition InventoryItem.c:731
Definition PlayerBaseClient.c:2
const int AGT_UACTION_TO_ITEM
Definition constants.c:482

Перекрестные ссылки AGT_UACTION_TO_ITEM, GetPlugin() и AnimatedActionBase::GetProgress().


Объявления и описания членов класса находятся в файле: