DayZ 1.24
Loading...
Searching...
No Matches
ActionDismantleStoneCircle.c
Go to the documentation of this file.
20
27
28 override typename GetInputType()
29 {
31 }
32
33 /*override bool HasProgress()
34 {
35 return false;
36 }*/
37
38 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
39 {
40 Object target_object = target.GetObject();
41
42 if (target_object && target_object.IsFireplace())
43 {
45
46 if (fireplace_target.IsBaseFireplace() && fireplace_target.CanDismantleStoneCircle())
47 return true;
48 }
49
50 return false;
51 }
52
54 {
55 Object target_object = action_data.m_Target.GetObject();
57
58 if (fireplace_target.CanDismantleStoneCircle())
59 {
60 ItemBase attached_item = ItemBase.Cast(fireplace_target.GetAttachmentByType(fireplace_target.ATTACHMENT_STONES));
61
62 //set oven state
63 fireplace_target.SetStoneCircleState(false);
64
65 // extend lifetime (but back to default of CE)
66 fireplace_target.SetLifetimeMax(10800);
67
68 //add specialty to soft skills
69 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
70 }
71 }
72}
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
void CreateConditionComponents()
Definition ActionBase.c:196
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
ActionDismantleStoneCircleCB ActionContinuousBaseCB ActionDismantleStoneCircle()
ActionData m_ActionData
void OnFinishProgressServer(ActionData action_data)
ref CABase m_ActionComponent
Definition ActionBase.c:30
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
const float DEFAULT
const float DEFAULT_DECONSTRUCT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597