DayZ 1.24
Loading...
Searching...
No Matches
GardenBase Class Reference
Collaboration diagram for GardenBase:
[legend]

Private Member Functions

void GardenPlot ()
 
override void EEInit ()
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void EEDelete (EntityAI parent)
 
override bool IsInventoryVisible ()
 
override int GetGardenSlotsCount ()
 
void RefreshSlots ()
 
override void OnPlacementStarted (Man player)
 
override void OnHologramBeingPlaced (Man player)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override bool CanBePlaced (Man player, vector position)
 

Private Attributes

Object m_ClutterCutter
 
const int GARDEN_SLOT_COUNT = 9
 

Detailed Description

Definition at line 1 of file GardenPlot.c.

Member Function Documentation

◆ CanBePlaced()

override bool GardenBase::CanBePlaced ( Man player,
vector position )
inlineprivate

Definition at line 112 of file GardenPlot.c.

113 {
114 string surface_type;
115 GetGame().SurfaceGetType3D(position[0], position[1], position[2], surface_type);
116
117 return GetGame().IsSurfaceFertile(surface_type);
118 }
proto native CGame GetGame()

References GetGame().

◆ EEDelete()

override void GardenBase::EEDelete ( EntityAI parent)
inlineprivate

Definition at line 30 of file GardenPlot.c.

31 {
32 super.EEDelete(parent);
33
34 if (m_ClutterCutter && GetGame())
35 {
36 GetGame().ObjectDelete(m_ClutterCutter);
38 }
39 }
Object m_ClutterCutter
Definition GardenPlot.c:3

References GetGame(), and m_ClutterCutter.

◆ EEInit()

override void GardenBase::EEInit ( )
inlineprivate

Definition at line 11 of file GardenPlot.c.

12 {
13 super.EEInit();
14 }

◆ GardenPlot()

void GardenBase::GardenPlot ( )
inlineprivate

Definition at line 6 of file GardenPlot.c.

7 {
8 SetBaseFertility(0.5);
9 }

◆ GetGardenSlotsCount()

◆ IsInventoryVisible()

override bool GardenBase::IsInventoryVisible ( )
inlineprivate

Definition at line 41 of file GardenPlot.c.

42 {
43 return true;
44 }

◆ OnHologramBeingPlaced()

override void GardenBase::OnHologramBeingPlaced ( Man player)
inlineprivate

Definition at line 82 of file GardenPlot.c.

83 {
85 }
void RefreshSlots()
Definition GardenPlot.c:51

References RefreshSlots().

◆ OnPlacementComplete()

override void GardenBase::OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
inlineprivate

Definition at line 87 of file GardenPlot.c.

88 {
89 super.OnPlacementComplete(player, position, orientation);
90
92 //vector pos = player_base.GetLocalProjectionPosition();
93 //vector ori = player_base.GetLocalProjectionOrientation();
94
95 if (GetGame().IsServer())
96 {
97 // To properly move the clutter cutter from spawn position, it must be deleted and created again.
99 {
100 GetGame().ObjectDelete(m_ClutterCutter);
102 }
103
104 if (!m_ClutterCutter)
105 {
106 m_ClutterCutter = GetGame().CreateObjectEx("ClutterCutter6x6", GetPosition(), ECE_PLACE_ON_SURFACE);
107 m_ClutterCutter.SetOrientation(orientation);
108 }
109 }
110 }
const int ECE_PLACE_ON_SURFACE
class JsonUndergroundAreaTriggerData GetPosition

References ECE_PLACE_ON_SURFACE, GetGame(), GetPosition, and m_ClutterCutter.

◆ OnPlacementStarted()

override void GardenBase::OnPlacementStarted ( Man player)
inlineprivate

Definition at line 77 of file GardenPlot.c.

78 {
80 }

References RefreshSlots().

◆ OnStoreLoad()

override bool GardenBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprivate

Definition at line 16 of file GardenPlot.c.

17 {
18 if (!super.OnStoreLoad(ctx, version))
19 return false;
20
21 if (!m_ClutterCutter)
22 {
23 m_ClutterCutter = GetGame().CreateObjectEx("ClutterCutter6x6", GetPosition(), ECE_PLACE_ON_SURFACE);
24 m_ClutterCutter.SetOrientation(GetOrientation());
25 }
26
27 return true;
28 }
vector GetOrientation()

References ECE_PLACE_ON_SURFACE, GetGame(), GetOrientation(), GetPosition, and m_ClutterCutter.

◆ RefreshSlots()

void GardenBase::RefreshSlots ( )
inlineprivate

Definition at line 51 of file GardenPlot.c.

52 {
53 HideSelection("SeedBase_1");
54 HideSelection("SeedBase_2");
55 HideSelection("SeedBase_3");
56 HideSelection("SeedBase_4");
57 HideSelection("SeedBase_5");
58 HideSelection("SeedBase_6");
59 HideSelection("SeedBase_7");
60 HideSelection("SeedBase_8");
61 HideSelection("SeedBase_9");
62 HideSelection("slotCovered_01");
63 HideSelection("slotCovered_02");
64 HideSelection("slotCovered_03");
65 HideSelection("slotCovered_04");
66 HideSelection("slotCovered_05");
67 HideSelection("slotCovered_06");
68 HideSelection("slotCovered_07");
69 HideSelection("slotCovered_08");
70 HideSelection("slotCovered_09");
71 }

Member Data Documentation

◆ GARDEN_SLOT_COUNT

const int GardenBase::GARDEN_SLOT_COUNT = 9
private

Definition at line 4 of file GardenPlot.c.

◆ m_ClutterCutter

Object GardenBase::m_ClutterCutter
private

Definition at line 3 of file GardenPlot.c.


The documentation for this class was generated from the following file: