Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionignitefireplacebyair.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime( UATimeSpent.FIREPLACE_IGNITE );
6  }
7 };
8 
10 {
12  {
13  m_CallbackClass = ActionIgniteFireplaceByAirCB;
14  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_BLOWFIREPLACE;
15  m_FullBody = true;
16  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
18  m_Text = "#blow_air_into_fireplace";
19  }
20 
21  override void CreateConditionComponents()
22  {
25  }
26 
27  override typename GetInputType()
28  {
30  }
31 
32  override bool ActionCondition ( PlayerBase player, ActionTarget target, ItemBase item )
33  {
34  Object target_object = target.GetObject();
35  FireplaceBase fireplace_target = FireplaceBase.Cast( target_object );
36 
37  if ( target_object && target_object.IsFireplace() )
38  {
39  if ( fireplace_target.IsBaseFireplace() || fireplace_target.IsFireplaceIndoor() )
40  {
41  if ( !fireplace_target.IsBurning() && fireplace_target.GetTemperature() >= fireplace_target.PARAM_MIN_TEMP_TO_REIGNITE )
42  {
43  return true;
44  }
45  }
46  }
47 
48  return false;
49  }
50 
51  override void OnFinishProgressServer( ActionData action_data )
52  {
53  FireplaceBase fireplace_target = FireplaceBase.Cast( action_data.m_Target.GetObject() );
54 
55  //start fire
56  fireplace_target.StartFire();
57 
58  action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
59  }
60 
61  bool SkipKindlingCheck()
62  {
63  return false;
64  }
65 }
ItemBase
Definition: inventoryitem.c:730
CCINotPresent
Definition: ccinotpresent.c:1
CAContinuousTime
Definition: cacontinuoustime.c:1
ContinuousInteractActionInput
Definition: actioninput.c:521
UASoftSkillsWeight
Definition: actionconstants.c:118
FireplaceBase
Definition: barrelholes_colorbase.c:1
UAMaxDistances
Definition: actionconstants.c:104
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
CCTNonRuined
Definition: cctnonruined.c:1
Object
Definition: objecttyped.c:1
UATimeSpent
Definition: actionconstants.c:26
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
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
ActionIgniteFireplaceByAirCB
Definition: actionignitefireplacebyair.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
ActionIgniteFireplaceByAir
Definition: actionignitefireplacebyair.c:9