DayZ 1.24
Loading...
Searching...
No Matches
ActionBuildStoneCircle.c
Go to the documentation of this file.
2{
7}
8
10{
12 {
13 m_CallbackClass = ActionBuildStoneCircleCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
18 m_Text = "#build_stonecircle";
19
20 }
21
28
29 override typename GetInputType()
30 {
32 }
33
34 override bool HasProgress()
35 {
36 return true;
37 }
38
39 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
40 {
41 Object target_object = target.GetObject();
42
43 if (target_object && target_object.IsFireplace())
44 {
46
47 if (fireplace_target.IsBaseFireplace() && fireplace_target.CanBuildStoneCircle())
48 return true;
49 }
50
51 return false;
52 }
53
55 {
56 Object target_object = action_data.m_Target.GetObject();
58
59 if (fireplace_target.CanBuildStoneCircle())
60 {
61 ItemBase attached_item = ItemBase.Cast(fireplace_target.GetAttachmentByType(fireplace_target.ATTACHMENT_STONES));
62
63 /*InventoryLocation inventory_location = new InventoryLocation;
64 attached_item.GetInventory().GetCurrentInventoryLocation( inventory_location );
65 fireplace_target.GetInventory().SetSlotLock( inventory_location.GetSlot(), true );*/
66
67 //set oven state
68 fireplace_target.SetStoneCircleState(true);
69
70 // extend lifetime
71 fireplace_target.SetLifetimeMax(FireplaceBase.LIFETIME_FIREPLACE_STONE_CIRCLE);
72
73 //add specialty to soft skills
74 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
75 }
76 }
77}
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
bool HasProgress()
For UI: hiding of progress bar.
Definition ActionBase.c:216
ActionBuildStoneCircleCB ActionContinuousBaseCB ActionBuildStoneCircle()
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_CONSTRUCT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597