Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
mushroombase.c
Go to the documentation of this file.
1
class
MushroomBase
:
Edible_Base
2
{
3
override
bool
CanBeCookedOnStick
()
4
{
5
return
true
;
6
}
7
8
override
bool
CanBeCooked
()
9
{
10
return
true
;
11
}
12
13
override
bool
IsMushroom
()
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
(
ActionEat
);
29
}
30
31
override
void
EEOnCECreate
()
32
{
33
int
rand =
Math
.
RandomInt
(0,10);
34
35
if
( rand > 6 )
36
{
37
ChangeFoodStage
(
FoodStageType
.ROTTEN );
38
SetHealth(
""
,
""
, GetMaxHealth()*0.1 );
39
}
40
else
if
( rand > 2 )
41
{
42
ChangeFoodStage
(
FoodStageType
.DRIED );
43
SetHealth(
""
,
""
, GetMaxHealth()*0.4 );
44
}
45
}
46
};
ActionForceFeed
ActionForceFeedSmallCB ActionForceFeed
Definition
actionforcefeed.c:11
AddAction
void AddAction(typename actionName)
Definition
advancedcommunication.c:220
ActionEat
Definition
actioneat.c:46
Edible_Base::Edible_Base
void Edible_Base()
Definition
edible_base.c:25
Edible_Base::ChangeFoodStage
void ChangeFoodStage(FoodStageType new_food_stage_type)
Definition
edible_base.c:598
Math
Definition
enmath.c:7
MushroomBase
Definition
mushroombase.c:2
MushroomBase::CanDecay
override bool CanDecay()
Definition
mushroombase.c:18
MushroomBase::CanBeCookedOnStick
override bool CanBeCookedOnStick()
Definition
mushroombase.c:3
MushroomBase::CanBeCooked
override bool CanBeCooked()
Definition
mushroombase.c:8
MushroomBase::EEOnCECreate
override void EEOnCECreate()
Definition
mushroombase.c:31
MushroomBase::IsMushroom
override bool IsMushroom()
Definition
mushroombase.c:13
MushroomBase::SetActions
override void SetActions()
Definition
mushroombase.c:23
FoodStageType
FoodStageType
Definition
foodstage.c:2
Math::RandomInt
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
Games
Dayz
scripts
4_world
entities
itembase
gear
food
mushroombase.c
Generated by
1.17.0