Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actiondismantlestonecircle.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime( UATimeSpent.DEFAULT_DECONSTRUCT );
6  }
7 }
8 
10 {
12  {
13  m_CallbackClass = ActionDismantleStoneCircleCB;
14  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
15  m_FullBody = true;
16  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
18  m_Text = "#dismantle_stonecircle";
19  }
20 
21  override void CreateConditionComponents()
22  {
23 
26  }
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  {
44  FireplaceBase fireplace_target = FireplaceBase.Cast( target_object );
45 
46  if ( fireplace_target.IsBaseFireplace() && fireplace_target.CanDismantleStoneCircle() )
47  {
48  return true;
49  }
50  }
51 
52  return false;
53  }
54 
55  override void OnFinishProgressServer( ActionData action_data )
56  {
57  Object target_object = action_data.m_Target.GetObject();
58  FireplaceBase fireplace_target = FireplaceBase.Cast( target_object );
59 
60  if ( fireplace_target.CanDismantleStoneCircle() )
61  {
62  ItemBase attached_item = ItemBase.Cast( fireplace_target.GetAttachmentByType( fireplace_target.ATTACHMENT_STONES ) );
63 
64  //set oven state
65  fireplace_target.SetStoneCircleState( false );
66 
67  // extend lifetime (but back to default of CE)
68  fireplace_target.SetLifetimeMax( 10800 );
69 
70  //add specialty to soft skills
71  action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
72  }
73  }
74 }
ItemBase
Definition: inventoryitem.c:730
GetInputType
override GetInputType()
Definition: actiondismantlestonecircle.c:28
ActionDismantleStoneCircleCB
Definition: actiondismantlestonecircle.c:1
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
OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition: actiondismantlestonecircle.c:55
CreateConditionComponents
override void CreateConditionComponents()
Definition: actiondismantlestonecircle.c:21
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
ActionDismantleStoneCircle
ActionDismantleStoneCircleCB ActionContinuousBaseCB ActionDismantleStoneCircle()
Definition: actiondismantlestonecircle.c:11
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
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actiondismantlestonecircle.c:38