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

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

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

class  ActionExtinguishFireplaceByLiquidCB
 

Функции

ActionExtinguishFireplaceByLiquidCB ActionContinuousBaseCB ActionExtinguishFireplaceByLiquid ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnStartAnimationLoop (ActionData action_data)
 
override void OnEndServer (ActionData action_data)
 

Переменные

const float TIME_TO_REPEAT = 0.5
 
const float WETNESS_GAIN_MULTIPLIER = 1.0
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
32 {
33 Object targetObject = target.GetObject();
34
35 if (targetObject.IsFireplace())
36 {
38
39 if (fireplace.CanExtinguishFire() && !item.IsDamageDestroyed() && (item.GetLiquidType() & (GROUP_LIQUID_BLOOD | LIQUID_WATER | LIQUID_BEER)))
40 {
41 if (!item.GetIsFrozen())
42 {
43 return true;
44 }
45 }
46 }
47
48 return false;
49 }
Definition BarrelHoles_ColorBase.c:2
Definition ObjectTyped.c:2
Definition EntityAI.c:95
const int GROUP_LIQUID_BLOOD
Definition constants.c:537
const int LIQUID_BEER
Definition constants.c:521
const int LIQUID_WATER
Definition constants.c:518

Перекрестные ссылки GROUP_LIQUID_BLOOD, LIQUID_BEER и LIQUID_WATER.

◆ ActionExtinguishFireplaceByLiquid()

ActionExtinguishFireplaceByLiquidCB ActionContinuousBaseCB ActionExtinguishFireplaceByLiquid ( )
16 {
18 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_EMPTY_VESSEL;
19 m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_MEDIUM;
20 m_FullBody = true;
21
22 m_Text = "#extinguish";
23 }
int m_CommandUID
Definition ActionBase.c:31
Definition ActionExtinguishFireplaceByLiquid.c:2
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

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

◆ CreateActionComponent()

override void CreateActionComponent ( )
private

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
26 {
27 m_ConditionItem = new CCINotRuinedAndEmpty();
28 m_ConditionTarget = new CCTObject(UAMaxDistances.SMALL);
29 }
Definition CCINotRuinedAndEmpty.c:2
Definition CCTObject.c:2
Definition ActionConstants.c:106
const float SMALL
Definition ActionConstants.c:107

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

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)
60 {
61 super.OnEndServer(action_data);
62
63 FireplaceBase fireplace = FireplaceBase.Cast(action_data.m_Target.GetObject());
64 fireplace.RefreshFireState();
65 }

◆ OnStartAnimationLoop()

override void OnStartAnimationLoop ( ActionData action_data)
52 {
53 super.OnStartAnimationLoop(action_data);
54
55 FireplaceBase fireplace = FireplaceBase.Cast(action_data.m_Target.GetObject());
56 fireplace.SetExtinguishingState();
57 }

Переменные

◆ TIME_TO_REPEAT

const float TIME_TO_REPEAT = 0.5
private

◆ WETNESS_GAIN_MULTIPLIER

const float WETNESS_GAIN_MULTIPLIER = 1.0
private