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

DEPRECATED. Подробнее...

+ Граф наследования:ActionWorldLiquidActionSwitch:

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

void ActionWorldLiquidActionSwitch ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void Start (ActionData action_data)
 
override bool IsLocal ()
 
override bool IsInstant ()
 
override bool RemoveForceTargetAfterUse ()
 

Закрытые данные

bool m_switch_to
 

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

DEPRECATED.

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

◆ ActionWorldLiquidActionSwitch()

7 {
8 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_PRONE;
9 }
int m_StanceMask
Definition ActionBase.c:62
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

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

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
26 {
27 ItemBase target_item = ItemBase.Cast(target.GetObject());
28 if (Barrel_ColorBase.Cast(target_item) && !target_item.IsOpen())
29 return false;
30
31 if ( target_item && item && Liquid.CanFillContainer( item, target_item.GetLiquidType(),true ) && Liquid.CanFillContainer( target_item, item.GetLiquidType(), true ) && !GetGame().IsInventoryOpen() ) //TODO find better condition than IsKindOf
32 {
33 if ( target_item.GetQuantity() > target_item.GetQuantityMin() && item.GetQuantity() < item.GetQuantityMax() && !player.GetLiquidTendencyDrain() && Liquid.CanFillContainer( item, target_item.GetLiquidType() ) )
34 {
35 if ( Liquid.CanFillContainer( target_item, item.GetLiquidType() ) )
36 {
37 m_switch_to = 0;//"#liquid_drain";
38 return true;
39 }
40 else
41 {
42 player.SetLiquidTendencyDrain(true);
43 return false;
44 }
45 }
46 if ( item.GetQuantity() > item.GetQuantityMin() && target_item.GetQuantity() < target_item.GetQuantityMax() && player.GetLiquidTendencyDrain() && Liquid.CanFillContainer( target_item, item.GetLiquidType() ) )
47 {
48 if ( Liquid.CanFillContainer( item, target_item.GetLiquidType() ) )
49 {
50 m_switch_to = 1;//"#liquid_pour";
51 return true;
52 }
53 else
54 {
55 player.SetLiquidTendencyDrain(false);
56 return false;
57 }
58 }
59 }
60 return false;
61 }
bool m_switch_to
Definition ActionWorldLiquidActionSwitch.c:5
Definition Barrel_ColorBase.c:2
Definition InventoryItem.c:731
Definition EntityAI.c:95
proto native CGame GetGame()

Перекрестные ссылки GetGame() и m_switch_to.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
12 {
15 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINonRuined.c:2
Definition CCTNonRuined.c:2
Definition ActionConstants.c:106
const float DEFAULT
Definition ActionConstants.c:108

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

◆ IsInstant()

override bool IsInstant ( )
inlineprivate
79 {
80 return true;
81 }

◆ IsLocal()

override bool IsLocal ( )
inlineprivate
74 {
75 return true;
76 }

◆ RemoveForceTargetAfterUse()

override bool RemoveForceTargetAfterUse ( )
inlineprivate
84 {
85 return false;
86 }

◆ Start()

override void Start ( ActionData action_data)
inlineprivate
64 {
65 super.Start( action_data );
66 bool state;
67 state = action_data.m_Player.GetLiquidTendencyDrain();
68 action_data.m_Player.SetLiquidTendencyDrain(!state);
69
70 //Print(action_data.m_Player.GetLiquidTendencyDrain());
71 }

Поля

◆ m_switch_to

bool m_switch_to
private

Используется в ActionCondition().


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