DayZ 1.24
Loading...
Searching...
No Matches
ActionExtinguishFireplaceByLiquid.c File Reference

Go to the source code of this file.

Classes

class  ActionExtinguishFireplaceByLiquidCB
 

Functions

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)
 

Variables

const float TIME_TO_REPEAT = 0.5
 
const float WETNESS_GAIN_MULTIPLIER = 1.0
 

Function Documentation

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

Definition at line 31 of file ActionExtinguishFireplaceByLiquid.c.

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_RIVERWATER | LIQUID_BEER)))
40 return true;
41 }
42
43 return false;
44 }
const int GROUP_LIQUID_BLOOD
Definition constants.c:514
const int LIQUID_BEER
Definition constants.c:507
const int LIQUID_WATER
Definition constants.c:504
const int LIQUID_RIVERWATER
Definition constants.c:505

References GROUP_LIQUID_BLOOD, LIQUID_BEER, LIQUID_RIVERWATER, and LIQUID_WATER.

◆ ActionExtinguishFireplaceByLiquid()

ActionExtinguishFireplaceByLiquidCB ActionContinuousBaseCB ActionExtinguishFireplaceByLiquid ( )

Definition at line 1 of file ActionExtinguishFireplaceByLiquid.c.

16 {
18 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_EMPTY_VESSEL;
20 m_FullBody = true;
21
22 m_Text = "#extinguish";
23 }
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
float m_SpecialtyWeight
Definition ActionBase.c:68
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

Referenced by ActionConstructor::RegisterActions(), and SetActions().

◆ CreateActionComponent()

override void ActionExtinguishFireplaceByLiquid::CreateActionComponent ( )
private

Definition at line 19 of file ActionExtinguishFireplaceByLiquid.c.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)

Definition at line 54 of file ActionExtinguishFireplaceByLiquid.c.

55 {
56 FireplaceBase fireplace = FireplaceBase.Cast(action_data.m_Target.GetObject());
57 fireplace.RefreshFireState();
58 }

◆ OnStartAnimationLoop()

override void OnStartAnimationLoop ( ActionData action_data)

Definition at line 46 of file ActionExtinguishFireplaceByLiquid.c.

47 {
48 super.OnStartAnimationLoop(action_data);
49
50 FireplaceBase fireplace = FireplaceBase.Cast(action_data.m_Target.GetObject());
51 fireplace.SetExtinguishingState();
52 }

Variable Documentation

◆ TIME_TO_REPEAT

const float TIME_TO_REPEAT = 0.5
private

Definition at line 16 of file ActionExtinguishFireplaceByLiquid.c.

◆ WETNESS_GAIN_MULTIPLIER

const float WETNESS_GAIN_MULTIPLIER = 1.0
private

Definition at line 17 of file ActionExtinguishFireplaceByLiquid.c.