Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
bearsteakmeat.c
Go to the documentation of this file.
1
class
BearSteakMeat
extends
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
IsMeat
()
14
{
15
return
true
;
16
}
17
18
override
bool
CanDecay
()
19
{
20
return
true
;
21
}
22
23
override
void
HandleFoodStageChangeAgents
(
FoodStageType
stageOld,
FoodStageType
stageNew)
24
{
25
int
keepAgentsRnd = 0;
26
if
(
Math
.
RandomFloat01
() <=
GameConstants
.
SALMONELLA_RETENTION_PREDATOR
)
27
{
28
keepAgentsRnd |=
eAgents
.SALMONELLA;
29
}
30
31
switch
(stageNew)
32
{
33
case
FoodStageType
.BAKED:
34
case
FoodStageType
.BOILED:
35
case
FoodStageType
.DRIED:
36
RemoveAllAgentsExcept
(keepAgentsRnd|
eAgents
.BRAIN|
eAgents
.HEAVYMETAL);
37
break
;
38
39
case
FoodStageType
.BURNED:
40
RemoveAllAgentsExcept
(
eAgents
.SALMONELLA|
eAgents
.HEAVYMETAL);
41
break
;
42
}
43
}
44
45
override
void
SetActions
()
46
{
47
super.SetActions();
48
49
AddAction
(
ActionForceFeed
);
50
AddAction
(
ActionEatMeat
);
51
52
AddAction
(
ActionCreateIndoorFireplace
);
53
AddAction
(
ActionCreateIndoorOven
);
54
}
55
}
ActionForceFeed
ActionForceFeedSmallCB ActionForceFeed
Definition
actionforcefeed.c:11
AddAction
void AddAction(typename actionName)
Definition
advancedcommunication.c:220
ActionCreateIndoorFireplace
Definition
actioncreateindoorfireplace.c:2
ActionCreateIndoorOven
Definition
actioncreateindooroven.c:2
ActionEatMeat
Definition
actioneatmeat.c:10
Edible_Base
Definition
edible_base.c:2
Edible_Base::CanDecay
override bool CanDecay()
Definition
bearsteakmeat.c:18
Edible_Base::CanBeCookedOnStick
override bool CanBeCookedOnStick()
Definition
bearsteakmeat.c:8
Edible_Base::CanBeCooked
override bool CanBeCooked()
Definition
bearsteakmeat.c:3
Edible_Base::HandleFoodStageChangeAgents
override void HandleFoodStageChangeAgents(FoodStageType stageOld, FoodStageType stageNew)
Definition
bearsteakmeat.c:23
Edible_Base::IsMeat
override bool IsMeat()
Definition
bearsteakmeat.c:13
Edible_Base::SetActions
override void SetActions()
Definition
bearsteakmeat.c:45
GameConstants
Definition
constants.c:664
Math
Definition
enmath.c:7
eAgents
eAgents
Definition
eagents.c:3
FoodStageType
FoodStageType
Definition
foodstage.c:2
GameConstants::SALMONELLA_RETENTION_PREDATOR
const float SALMONELLA_RETENTION_PREDATOR
Definition
constants.c:1031
Math::RandomFloat01
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
Definition
enmath.c:126
RemoveAllAgentsExcept
override void RemoveAllAgentsExcept(int agent_to_keep)
Definition
itembase.c:8890
Games
Dayz
scripts
4_world
entities
itembase
edible_base
bearsteakmeat.c
Generated by
1.17.0