Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
apple.c
Go to the documentation of this file.
1
class
Apple
:
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
}
ActionEatFruit
Definition:
actioneatfruit.c:9
AddAction
void AddAction(typename actionName)
Definition:
advancedcommunication.c:86
ActionCreateIndoorFireplace
Definition:
actioncreateindoorfireplace.c:1
ActionCreateIndoorOven
Definition:
actioncreateindooroven.c:1
FoodStageType
FoodStageType
Definition:
foodstage.c:1
Apple
Definition:
apple.c:1
ActionForceFeed
ActionForceFeedSmallCB ActionForceFeed
Definition:
actionforcefeed.c:11
ChangeFoodStage
void ChangeFoodStage(FoodStageType new_food_stage_type)
Definition:
edible_base.c:445
Math
Definition:
enmath.c:6
Edible_Base
Definition:
bearsteakmeat.c:1
DAYZ
scripts_v1.24.157551
scripts
world
entities
itembase
edible_base
apple.c
Generated by
1.8.17