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

Go to the source code of this file.

Classes

class  ActionExtinguishFireplaceByExtinguisherCB
 

Functions

ActionExtinguishFireplaceByExtinguisherCB ActionContinuousBaseCB ActionExtinguishFireplaceByExtinguisher ()
 
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 = 0.5
 

Function Documentation

◆ ActionCondition()

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

Definition at line 32 of file ActionExtinguishFireplaceByExtinguisher.c.

33 {
34 Object targetObject = target.GetObject();
35 if (targetObject.IsFireplace())
36 {
38
39 if (fireplace.CanExtinguishFire() && !item.IsDamageDestroyed())
40 return true;
41 }
42
43 return false;
44 }

◆ ActionExtinguishFireplaceByExtinguisher()

ActionExtinguishFireplaceByExtinguisherCB ActionContinuousBaseCB ActionExtinguishFireplaceByExtinguisher ( )

Definition at line 1 of file ActionExtinguishFireplaceByExtinguisher.c.

16 {
18 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_FIREESTINGUISHER;
19 m_FullBody = true;
20 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
22
23 m_Text = "#extinguish";
24 }
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
float m_SpecialtyWeight
Definition ActionBase.c:68
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

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

◆ CreateActionComponent()

override void ActionExtinguishFireplaceByExtinguisher::CreateActionComponent ( )
private

Definition at line 19 of file ActionExtinguishFireplaceByExtinguisher.c.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

Definition at line 26 of file ActionExtinguishFireplaceByExtinguisher.c.

27 {
30 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)

Definition at line 54 of file ActionExtinguishFireplaceByExtinguisher.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 ActionExtinguishFireplaceByExtinguisher.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 ActionExtinguishFireplaceByExtinguisher.c.

◆ WETNESS_GAIN_MULTIPLIER

const float WETNESS_GAIN_MULTIPLIER = 0.5
private

Definition at line 17 of file ActionExtinguishFireplaceByExtinguisher.c.