DayZ 1.24
Loading...
Searching...
No Matches
Pear.c
Go to the documentation of this file.
2{
3 override bool CanBeCooked()
4 {
5 return true;
6 }
7
8 override bool CanBeCookedOnStick()
9 {
10 return true;
11 }
12
13 override bool IsFruit()
14 {
15 return true;
16 }
17
18 override void SetActions()
19 {
20 super.SetActions();
21
22 AddAction(ActionForceFeed);
26 }
27
28 override bool CanDecay()
29 {
30 return true;
31 }
32
33 override void EEOnCECreate()
34 {
35 int rand = Math.RandomInt(0, 10);
36
37 if (rand > 6)
38 {
40 SetHealth("", "", GetMaxHealth() * 0.1);
41 }
42 else if (rand > 2)
43 {
45 SetHealth("", "", GetMaxHealth() * 0.4);
46 }
47 }
48}
void AddAction(typename actionName)
FoodStageType
Definition FoodStage.c:2
void ChangeFoodStage(FoodStageType new_food_stage_type)
Definition EnMath.c:7
Definition Pear.c:2
override bool CanDecay()
Definition Pear.c:28
override bool CanBeCooked()
Definition Pear.c:3
override bool CanBeCookedOnStick()
Definition Pear.c:8
override void SetActions()
Definition Pear.c:18
override bool IsFruit()
Definition Pear.c:13
override void EEOnCECreate()
Definition Pear.c:33
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].