DayZ
1.24
Loading...
Searching...
No Matches
Potato.c
Go to the documentation of this file.
1
class
Potato
:
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
bool
CanDecay
()
19
{
20
return
true
;
21
}
22
23
override
void
SetActions
()
24
{
25
super
.SetActions();
26
27
AddAction
(ActionForceFeed);
28
AddAction
(
ActionEatFruit
);
29
AddAction
(
ActionCreateIndoorFireplace
);
30
AddAction
(
ActionCreateIndoorOven
);
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
Potato
Definition
Potato.c:2
Potato::EEOnCECreate
override void EEOnCECreate()
Definition
Potato.c:33
Potato::IsFruit
override bool IsFruit()
Definition
Potato.c:13
Potato::CanBeCooked
override bool CanBeCooked()
Definition
Potato.c:3
Potato::CanBeCookedOnStick
override bool CanBeCookedOnStick()
Definition
Potato.c:8
Potato::SetActions
override void SetActions()
Definition
Potato.c:23
Potato::CanDecay
override bool CanDecay()
Definition
Potato.c:18
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
Potato.c
Generated by
1.10.0