Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
plant.c
Go to the documentation of this file.
1 /*enum PlantType
2 {
3  TREE_HARD = 0,
4  TREE_SOFT = 1,
5  BUSH_HARD = 2,
6  BUSH_SOFT = 3,
7 }*/
8 //-----------------------------------------------------------------------------
18 {
19  override void OnTreeCutDown(EntityAI cutting_entity)
20  {
21  GetGame().RPCSingleParam(cutting_entity, PlantType.TREE_HARD, null, true);
22  }
23 
24  override bool IsTree()
25  {
26  return true;
27  }
28 
29  override bool CanBeAutoDeleted()
30  {
31  return false;
32  }
33 };
34 
35 //-----------------------------------------------------------------------------
38 {
39  override void OnTreeCutDown(EntityAI cutting_entity)
40  {
41  GetGame().RPCSingleParam(cutting_entity, PlantType.TREE_SOFT, null, true);
42  }
43 
44  override bool IsTree()
45  {
46  return true;
47  }
48 
49  override bool CanBeAutoDeleted()
50  {
51  return false;
52  }
53 };
54 
55 //-----------------------------------------------------------------------------
59 {
60  override void OnTreeCutDown(EntityAI cutting_entity)
61  {
62 
63  GetGame().RPCSingleParam(cutting_entity, PlantType.BUSH_HARD, null, true);
64  }
65 
66  override bool IsBush()
67  {
68  return true;
69  }
70 
71  override bool CanBeAutoDeleted()
72  {
73  return false;
74  }
75 };
76 
77 //-----------------------------------------------------------------------------
80 {
81  override void OnTreeCutDown(EntityAI cutting_entity)
82  {
83  GetGame().RPCSingleParam(cutting_entity, PlantType.BUSH_SOFT, null, true);
84  }
85 
86  override bool IsBush()
87  {
88  return true;
89  }
90 
91  override bool CanBeAutoDeleted()
92  {
93  return false;
94  }
95 };
GetGame
proto native CGame GetGame()
TreeHard
Specific tree class can be declared as: class TreeHard + _ + p3d filename (without extension)
Definition: plant.c:17
TreeSoft
For specific tree declaration see description of TreeHard.
Definition: plant.c:37
BushSoft
For specific tree declaration see description of TreeHard.
Definition: plant.c:79
BushHard
Definition: plant.c:58
PlantSuper
WoodBase PlantSuper
Definition: plant.c:1
EntityAI
Definition: building.c:5