DayZ 1.24
Loading...
Searching...
No Matches
ActionBuildStoneCircle.c File Reference

Go to the source code of this file.

Classes

class  ActionBuildStoneCircleCB
 

Functions

ActionBuildStoneCircleCB ActionContinuousBaseCB ActionBuildStoneCircle ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override GetInputType ()
 
override bool HasProgress ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 

Function Documentation

◆ ActionBuildStoneCircle()

Definition at line 1 of file ActionBuildStoneCircle.c.

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 }
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
float m_SpecialtyWeight
Definition ActionBase.c:68
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

Referenced by ActionConstructor::RegisterActions(), and FireplaceBase::SetActions().

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

Definition at line 39 of file ActionBuildStoneCircle.c.

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 }

◆ CreateActionComponent()

override void ActionBuildStoneCircle::CreateActionComponent ( )

Definition at line 12 of file ActionBuildStoneCircle.c.

12 {
13 m_CallbackClass = ActionBuildStoneCircleCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
15 m_FullBody = true;

References m_FullBody, m_SpecialtyWeight, m_StanceMask, m_Text, and UASoftSkillsWeight::ROUGH_HIGH.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

Definition at line 22 of file ActionBuildStoneCircle.c.

23 {
24
27 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
const float DEFAULT

References UAMaxDistances::DEFAULT, m_ConditionItem, and m_ConditionTarget.

◆ GetInputType()

override GetInputType ( )

◆ HasProgress()

override bool HasProgress ( )

Definition at line 34 of file ActionBuildStoneCircle.c.

35 {
36 return true;
37 }

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)

Definition at line 54 of file ActionBuildStoneCircle.c.

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 }

References m_SpecialtyWeight.