DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
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 {
10 }
11};
12
14{
16 {
18 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_FIREESTINGUISHER;
19 m_FullBody = true;
20 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
22 m_Text = "#extinguish";
23 }
24
26 {
27
30 }
31
32 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
33 {
34 Object target_object = target.GetObject();
35 if ( target_object.IsFireplace() )
36 {
37 FireplaceBase fireplace_target = FireplaceBase.Cast( target_object );
38
39 if ( fireplace_target.CanExtinguishFire() && !item.IsDamageDestroyed() )
40 {
41 return true;
42 }
43 }
44
45 return false;
46 }
47
48 //TODO Fire extinguisher is not in BETA (no animations, no sounds)
49 //If something will change in the future, extinguishing action needs to be updated to reflect the fire extinguisher usage
50 /*
51 override void OnCancelServer( ActionData action_data )
52 {
53 Object target_object = action_data.m_Target.GetObject();
54 FireplaceBase fireplace_target = FireplaceBase.Cast( target_object );
55
56 //reset fire state
57 fireplace_target.RefreshFireState();
58 }
59 */
60}
protected float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
protected string m_Text
Definition ActionBase.c:49
protected bool m_FullBody
Definition ActionBase.c:52
protected int m_StanceMask
Definition ActionBase.c:53
class ActionTargets ActionTarget
protected ActionData m_ActionData
ItemBase m_MainItem
Definition ActionBase.c:28
ref CABase m_ActionComponent
Definition ActionBase.c:30
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool CanExtinguishFire()
override float GetLiquidThroughputCoef()
const float FIREPLACE_EXTINGUISHER
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602