Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
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 {
21 m_FullBody = true;
22 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
23 m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_LOW;
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 if (!CfgGameplayHandler.GetDisableColdAreaPlacementCheck() && player.GetInColdArea())
36 return false;
37
38 GardenPlot targetPlot = GardenPlot.Cast( target.GetObject() );
39
40 if ( targetPlot && !player.IsPlacingLocal() )
41 return true;
42 else
43 return false;
44 }
45
46 void SetupAnimation( ItemBase item )
47 {
48 if ( item )
49 {
50 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DIG;
51 }
52 }
53
54 override void OnFinishProgressServer( ActionData action_data )
55 {
56 GardenPlot targetPlot = GardenPlot.Cast( action_data.m_Target.GetObject() );
57 targetPlot.Delete();
58
59 if ( GetGame().IsServer() )
60 MiscGameplayFunctions.DealAbsoluteDmg( action_data.m_MainItem, 10 );
61 }
62};
ActionData m_ActionData
float m_SpecialtyWeight
Definition actionbase.c:77
int m_StanceMask
Definition actionbase.c:62
string m_Text
Definition actionbase.c:58
ref CCIBase m_ConditionItem
Definition actionbase.c:64
bool m_FullBody
Definition actionbase.c:61
ref CCTBase m_ConditionTarget
Definition actionbase.c:65
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602
eBrokenLegs
Definition ebrokenlegs.c:2
proto native CGame GetGame()