Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
greenbellpepper.c
Go to the documentation of this file.
1
class
GreenBellPepper
:
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
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
(
ActionEat
);
29
AddAction
(
ActionCreateIndoorFireplace
);
30
AddAction
(
ActionCreateIndoorOven
);
31
}
32
33
override
void
EEOnCECreate
()
34
{
35
int
rand =
Math
.
RandomInt
(0,10);
36
float
baseTemp =
g_Game
.GetMission().GetWorldData().GetBaseEnvTemperature();
37
38
if
( baseTemp <=
GameConstants
.
COLD_AREA_TEMPERATURE_THRESHOLD
)
39
{
40
int
randQ =
Math
.
RandomFloat
(10,80);
41
SetQuantity
( randQ );
42
43
if
( rand >= 9 )
44
{
45
ChangeFoodStage
(
FoodStageType
.ROTTEN );
46
SetHealth(
""
,
""
, GetMaxHealth()*0.1 );
47
48
}
49
else
50
{
51
ChangeFoodStage
(
FoodStageType
.DRIED );
52
SetHealth(
""
,
""
, GetMaxHealth()*0.4 );
53
}
54
}
55
else
56
{
57
if
( rand > 6 )
58
{
59
ChangeFoodStage
(
FoodStageType
.ROTTEN );
60
SetHealth(
""
,
""
, GetMaxHealth()*0.1 );
61
}
62
else
if
( rand > 2 )
63
{
64
ChangeFoodStage
(
FoodStageType
.DRIED );
65
SetHealth(
""
,
""
, GetMaxHealth()*0.4 );
66
}
67
}
68
}
69
}
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
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
GameConstants
Definition
constants.c:664
GreenBellPepper
Definition
greenbellpepper.c:2
GreenBellPepper::CanDecay
override bool CanDecay()
Definition
greenbellpepper.c:18
GreenBellPepper::CanBeCookedOnStick
override bool CanBeCookedOnStick()
Definition
greenbellpepper.c:3
GreenBellPepper::CanBeCooked
override bool CanBeCooked()
Definition
greenbellpepper.c:8
GreenBellPepper::EEOnCECreate
override void EEOnCECreate()
Definition
greenbellpepper.c:33
GreenBellPepper::IsFruit
override bool IsFruit()
Definition
greenbellpepper.c:13
GreenBellPepper::SetActions
override void SetActions()
Definition
greenbellpepper.c:23
ItemBase::SetQuantity
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Definition
pileofwoodenplanks.c:88
Math
Definition
enmath.c:7
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
FoodStageType
FoodStageType
Definition
foodstage.c:2
GameConstants::COLD_AREA_TEMPERATURE_THRESHOLD
const float COLD_AREA_TEMPERATURE_THRESHOLD
Definition
constants.c:794
Math::RandomInt
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
Math::RandomFloat
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
Games
Dayz
scripts
4_world
entities
itembase
edible_base
greenbellpepper.c
Generated by
1.17.0