DayZ
1.24
Loading...
Searching...
No Matches
Pear.c
Go to the documentation of this file.
1
class
Pear
:
Edible_Base
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);
23
AddAction
(
ActionEatFruit
);
24
AddAction
(
ActionCreateIndoorFireplace
);
25
AddAction
(
ActionCreateIndoorOven
);
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
{
39
ChangeFoodStage
(
FoodStageType
.ROTTEN);
40
SetHealth(
""
,
""
, GetMaxHealth() * 0.1);
41
}
42
else
if
(
rand
> 2)
43
{
44
ChangeFoodStage
(
FoodStageType
.DRIED);
45
SetHealth(
""
,
""
, GetMaxHealth() * 0.4);
46
}
47
}
48
}
AddAction
void AddAction(typename actionName)
Definition
AdvancedCommunication.c:212
FoodStageType
FoodStageType
Definition
FoodStage.c:2
ActionCreateIndoorFireplace
Definition
ActionCreateIndoorFireplace.c:2
ActionCreateIndoorOven
Definition
ActionCreateIndoorOven.c:2
ActionEatFruit
Definition
ActionEatFruit.c:10
Edible_Base
Definition
Edible_Base.c:2
Edible_Base::ChangeFoodStage
void ChangeFoodStage(FoodStageType new_food_stage_type)
Definition
Edible_Base.c:394
Math
Definition
EnMath.c:7
Param3
Definition
EntityAI.c:95
Pear
Definition
Pear.c:2
Pear::CanDecay
override bool CanDecay()
Definition
Pear.c:28
Pear::CanBeCooked
override bool CanBeCooked()
Definition
Pear.c:3
Pear::CanBeCookedOnStick
override bool CanBeCookedOnStick()
Definition
Pear.c:8
Pear::SetActions
override void SetActions()
Definition
Pear.c:18
Pear::IsFruit
override bool IsFruit()
Definition
Pear.c:13
Pear::EEOnCECreate
override void EEOnCECreate()
Definition
Pear.c:33
Math::RandomInt
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
scripts
4_World
Entities
ItemBase
Edible_Base
Pear.c
Generated by
1.10.0