DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл ActionDrinkWellContinuous.c

См. исходные тексты.

Структуры данных

class  ActionDrinkWellContinuousCB
 

Функции

ActionDrinkWellContinuousCB ActionContinuousBaseCB ActionDrinkWellContinuous ()
 
override void CreateActionComponent ()
 
override bool IsDrink ()
 
override GetInputType ()
 
override bool CanBeUsedInFreelook ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnStart (ActionData action_data)
 
override void OnEnd (ActionData action_data)
 
override void OnFinishProgressServer (ActionData action_data)
 
override void OnEndAnimationLoopServer (ActionData action_data)
 
override bool IsLockTargetOnUse ()
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
43 {
44 if (item && item.IsHeavyBehaviour())
45 return false;
46
47 if (!player.CanEatAndDrink())
48 return false;
49
50 return target.GetObject() && (target.GetObject().GetWaterSourceObjectType() == EWaterSourceObjectType.WELL || target.GetObject().IsWell());
51 }
EWaterSourceObjectType
Definition EWaterSourceObjectType.c:2
Definition EntityAI.c:95

◆ ActionDrinkWellContinuous()

ActionDrinkWellContinuousCB ActionContinuousBaseCB ActionDrinkWellContinuous ( )
12 {
13 m_CallbackClass = ActionDrinkWellContinuousCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DRINKWELL;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
17
18 m_Text = "#drink";
19 }
int m_CommandUID
Definition ActionBase.c:31
int m_StanceMask
Definition ActionBase.c:33
Definition ActionDrinkWellContinuous.c:2
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Используется в ActionConstructor::RegisterActions() и BuildingSuper::SetActions().

◆ CanBeUsedInFreelook()

override bool CanBeUsedInFreelook ( )
32 {
33 return false;
34 }

◆ CreateActionComponent()

override void CreateActionComponent ( )
12 {
13 m_CallbackClass = ActionDrinkWellContinuousCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DRINKWELL;
15 m_FullBody = true;

Перекрестные ссылки m_CommandUID и m_StanceMask.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
37 {
38 m_ConditionItem = new CCINone();
39 m_ConditionTarget = new CCTCursor(UAMaxDistances.DEFAULT);
40 }
Definition CCINone.c:2
Definition CCTCursor.c:2
Definition ActionConstants.c:106
const float DEFAULT
Definition ActionConstants.c:108

Перекрестные ссылки UAMaxDistances::DEFAULT.

◆ GetInputType()

override GetInputType ( )
27 {
29 }
Definition ActionInput.c:522

◆ IsDrink()

override bool IsDrink ( )
22 {
23 return true;
24 }

◆ IsLockTargetOnUse()

override bool IsLockTargetOnUse ( )
89 {
90 return false;
91 }

◆ OnEnd()

override void OnEnd ( ActionData action_data)
61 {
62 action_data.m_Player.TryHideItemInHands(false);
63 }

◆ OnEndAnimationLoopServer()

override void OnEndAnimationLoopServer ( ActionData action_data)
81 {
82 if (action_data.m_Player.HasBloodyHands())
83 {
84 action_data.m_Player.InsertAgent(eAgents.CHOLERA, 1);
85 }
86 }
eAgents
Definition EAgents.c:3

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
66 {
67 Param1<float> nacdata = Param1<float>.Cast(action_data.m_ActionComponent.GetACData());
68 if (nacdata)
69 {
70 float amount = UAQuantityConsumed.DRINK;
71 action_data.m_Player.Consume(null,amount, EConsumeType.ENVIRO_WELL);
72 }
73
74 if (action_data.m_Player.HasBloodyHands() && !action_data.m_Player.GetInventory().FindAttachment(InventorySlots.GLOVES))
75 {
76 action_data.m_Player.SetBloodyHandsPenalty();
77 }
78 }
EConsumeType
Definition EConsumeType.c:2
provides access to slot configuration
Definition InventorySlots.c:6
Definition ActionConstants.c:4
const float DRINK
Definition ActionConstants.c:14

Перекрестные ссылки UAQuantityConsumed::DRINK.

◆ OnStart()

override void OnStart ( ActionData action_data)
54 {
55 super.OnStart(action_data);
56
57 action_data.m_Player.TryHideItemInHands(true);
58 }