DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
ActionDismantleGardenPlot.c
Go to the documentation of this file.
2{
3 override void CreateActionComponent()
4 {
6 }
7};
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 {
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};
protected float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
protected string m_Text
Definition ActionBase.c:49
protected bool m_FullBody
Definition ActionBase.c:52
protected int m_StanceMask
Definition ActionBase.c:53
class ActionTargets ActionTarget
eBrokenLegs
Definition EBrokenLegs.c:2
protected ActionData m_ActionData
ItemBase m_MainItem
Definition ActionBase.c:28
ref CABase m_ActionComponent
Definition ActionBase.c:30
ref ActionTarget m_Target
Definition ActionBase.c:32
override void OnFinishProgressServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
const float DIG_GARDEN
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602
proto native CGame GetGame()