Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionextinguishfireplacebyextinguisher.c
Go to the documentation of this file.
2 {
3  private const float TIME_TO_REPEAT = 0.5;
4  private const float WETNESS_GAIN_MULTIPLIER = 0.5;
5 
6  override void CreateActionComponent()
7  {
8  m_ActionData.m_ActionComponent = new CAContinuousQuantityExtinguish(UAQuantityConsumed.FIREPLACE_EXTINGUISHER, TIME_TO_REPEAT, WETNESS_GAIN_MULTIPLIER);
9  CAContinuousQuantityExtinguish.Cast(m_ActionData.m_ActionComponent).MultiplyQuantityUsed(m_ActionData.m_MainItem.GetLiquidThroughputCoef());
10  }
11 }
12 
14 {
16  {
18  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_FIREESTINGUISHER;
19  m_FullBody = true;
20  m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
22 
23  m_Text = "#extinguish";
24  }
25 
26  override void CreateConditionComponents()
27  {
30  }
31 
32  override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
33  {
34  Object targetObject = target.GetObject();
35  if (targetObject.IsFireplace())
36  {
37  FireplaceBase fireplace = FireplaceBase.Cast(targetObject);
38 
39  if (fireplace.CanExtinguishFire() && !item.IsDamageDestroyed())
40  return true;
41  }
42 
43  return false;
44  }
45 
46  override void OnStartAnimationLoop(ActionData action_data)
47  {
48  super.OnStartAnimationLoop(action_data);
49 
50  FireplaceBase fireplace = FireplaceBase.Cast(action_data.m_Target.GetObject());
51  fireplace.SetExtinguishingState();
52  }
53 
54  override void OnEndServer(ActionData action_data)
55  {
56  FireplaceBase fireplace = FireplaceBase.Cast(action_data.m_Target.GetObject());
57  fireplace.RefreshFireState();
58  }
59 }
ItemBase
Definition: inventoryitem.c:730
OnEndServer
override void OnEndServer(ActionData action_data)
Definition: actionextinguishfireplacebyextinguisher.c:54
CAContinuousQuantityExtinguish
Definition: cacontinuousquantityextinguish.c:1
ActionExtinguishFireplaceByExtinguisher
ActionExtinguishFireplaceByExtinguisherCB ActionContinuousBaseCB ActionExtinguishFireplaceByExtinguisher()
Definition: actionextinguishfireplacebyextinguisher.c:15
UASoftSkillsWeight
Definition: actionconstants.c:118
UAQuantityConsumed
Definition: actionconstants.c:3
OnStartAnimationLoop
override void OnStartAnimationLoop(ActionData action_data)
Definition: actionextinguishfireplacebyextinguisher.c:46
FireplaceBase
Definition: barrelholes_colorbase.c:1
CCTDummy
Definition: cctdummy.c:1
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actionextinguishfireplacebyextinguisher.c:32
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
CreateConditionComponents
override void CreateConditionComponents()
Definition: actionextinguishfireplacebyextinguisher.c:26
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
TIME_TO_REPEAT
const private float TIME_TO_REPEAT
Definition: actionextinguishfireplacebyextinguisher.c:2
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
ActionExtinguishFireplaceByExtinguisherCB
Definition: actionextinguishfireplacebyextinguisher.c:1
Object
Definition: objecttyped.c:1
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
WETNESS_GAIN_MULTIPLIER
const private float WETNESS_GAIN_MULTIPLIER
Definition: actionextinguishfireplacebyextinguisher.c:3
m_Text
protected string m_Text
Definition: actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
ActionContinuousBase
Definition: actioncontinuousbase.c:132
CCINonRuined
Definition: ccinonruined.c:1
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53