DayZ 1.24
Loading...
Searching...
No Matches
ActionDismantleGardenPlot.c
Go to the documentation of this file.
8
10{
11 //GardenPlot m_GardenPlot;
13 {
14 m_ConditionItem = new CCINonRuined;//new CCINone;
16 }
17
19 {
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
44 {
45 if (item)
46 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DIG;
47 }
48
50 {
51 GardenPlot targetPlot = GardenPlot.Cast(action_data.m_Target.GetObject());
52 targetPlot.Delete();
53
54 if (GetGame().IsServer())
55 MiscGameplayFunctions.DealAbsoluteDmg(action_data.m_MainItem, 10);
56 }
57};
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
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
eBrokenLegs
Definition EBrokenLegs.c:2
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void OnFinishProgressServer(ActionData action_data)
const float DIG_GARDEN
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
proto native CGame GetGame()