Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actiondismantlegardenplot.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAContinuousTime( UATimeSpent.DIG_GARDEN );
6  }
7 };
8 
10 {
11  //GardenPlot m_GardenPlot;
12  override void CreateConditionComponents()
13  {
14  m_ConditionItem = new CCINonRuined;//new CCINone;
16  }
17 
19  {
20  m_CallbackClass = ActionDismantleGardenPlotCB;
21  m_FullBody = true;
22  m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
24  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DIGMANIPULATE;
25 
26  m_Text = "#remove_garden_plot";
27  }
28 
29  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
30  {
31  //Action not allowed if player has broken legs
32  if ( player.GetBrokenLegs() == eBrokenLegs.BROKEN_LEGS )
33  return false;
34 
35  GardenPlot targetPlot = GardenPlot.Cast( target.GetObject() );
36 
37  if ( targetPlot && !player.IsPlacingLocal() )
38  return true;
39  else
40  return false;
41  }
42 
43  void SetupAnimation( ItemBase item )
44  {
45  if ( item )
46  {
47  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DIG;
48  }
49  }
50 
51  override void OnFinishProgressServer( ActionData action_data )
52  {
53  GardenPlot targetPlot = GardenPlot.Cast( action_data.m_Target.GetObject() );
54  targetPlot.Delete();
55 
56  if ( GetGame().IsServer() )
57  MiscGameplayFunctions.DealAbsoluteDmg( action_data.m_MainItem, 10 );
58  }
59 };
ItemBase
Definition: inventoryitem.c:730
GetGame
proto native CGame GetGame()
CAContinuousTime
Definition: cacontinuoustime.c:1
UASoftSkillsWeight
Definition: actionconstants.c:118
eBrokenLegs
eBrokenLegs
Definition: ebrokenlegs.c:1
CCTCursorNoRuinCheck
Definition: cctcursornoruincheck.c:1
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
UATimeSpent
Definition: actionconstants.c:26
ActionContinuousBaseCB
Definition: actioncontinuousbase.c:1
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
CCINonRuined
Definition: ccinonruined.c:1
ActionDismantleGardenPlot
Definition: actiondismantlegardenplot.c:9
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68
ActionDismantleGardenPlotCB
Definition: actiondismantlegardenplot.c:1
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53