DayZ 1.24
Loading...
Searching...
No Matches
ActionIgniteFireplaceByAir.c
Go to the documentation of this file.
8
10{
12 {
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
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();
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 return true;
43 }
44 }
45
46 return false;
47 }
48
50 {
51 FireplaceBase fireplace_target = FireplaceBase.Cast(action_data.m_Target.GetObject());
52
53 //start fire
54 fireplace_target.StartFire();
55
56 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
57 }
58
60 {
61 return false;
62 }
63}
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
int m_StanceMask
Definition ActionBase.c:53
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void OnFinishProgressServer(ActionData action_data)
const float DEFAULT
const float FIREPLACE_IGNITE
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597