Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
hungernotfr.c
Go to the documentation of this file.
1
class
HungerNotfr
:
NotifierBase
2
{
3
protected
const
float
DEC_TRESHOLD_LOW
= 0;
4
protected
const
float
DEC_TRESHOLD_MED
= -0.35;
5
protected
const
float
DEC_TRESHOLD_HIGH
= -0.57;
6
protected
const
float
INC_TRESHOLD_LOW
= 0;
7
protected
const
float
INC_TRESHOLD_MED
= 0.35;
8
protected
const
float
INC_TRESHOLD_HIGH
= 0.57;
9
10
override
int
GetNotifierType
()
11
{
12
return
eNotifiers
.NTF_HUNGRY;
13
}
14
15
override
void
DisplayTendency
(
float
delta)
16
{
17
//PrintString("delta:"+delta.ToString());
18
int
tendency =
CalculateTendency
(delta,
INC_TRESHOLD_LOW
,
INC_TRESHOLD_MED
,
INC_TRESHOLD_HIGH
,
DEC_TRESHOLD_LOW
,
DEC_TRESHOLD_MED
,
DEC_TRESHOLD_HIGH
);
19
//GetVirtualHud().SetStatus(eDisplayElements.DELM_TDCY_ENERGY,tendency);
20
21
//DSLevels level = DetermineLevel( GetObservedValue(), PlayerConstants.THRESHOLD_ENERGY_WARNING, PlayerConstants.THRESHOLD_ENERGY_CRITICAL, PlayerConstants.THRESHOLD_ENERGY_BLINKING, PlayerConstants.THRESHOLD_ENERGY_EXTRA );
22
23
EStatLevels
energy_level =
m_Player
.GetStatLevelEnergy();
24
DisplayElementTendency
dis_elm =
DisplayElementTendency
.Cast(
GetVirtualHud
().
GetElement
(eDisplayElements.DELM_TDCY_ENERGY));
25
26
if
( dis_elm )
27
{
28
dis_elm.SetTendency(tendency);
29
dis_elm.SetSeriousnessLevel(energy_level);
30
31
}
32
33
/*
34
Print("-----------------------------------------------------------");
35
Print("water:"+ typename.EnumToString(EStatLevels,m_Player.GetStatLevelWater()));
36
Print("energy:"+ typename.EnumToString(EStatLevels,m_Player.GetStatLevelEnergy()));
37
Print("health:"+ typename.EnumToString(EStatLevels,m_Player.GetStatLevelHealth()));
38
Print("blood:"+ typename.EnumToString(EStatLevels,m_Player.GetStatLevelBlood()));
39
*/
40
}
41
42
override
float
GetObservedValue
()
43
{
44
return
m_Player
.GetStatEnergy().Get();
45
}
46
};
DisplayElementTendency
Definition
tendencybacteria.c:2
HungerNotfr
Definition
hungernotfr.c:2
HungerNotfr::DEC_TRESHOLD_MED
const float DEC_TRESHOLD_MED
Definition
hungernotfr.c:4
HungerNotfr::GetObservedValue
override float GetObservedValue()
Definition
hungernotfr.c:42
HungerNotfr::DisplayTendency
override void DisplayTendency(float delta)
Definition
hungernotfr.c:15
HungerNotfr::INC_TRESHOLD_LOW
const float INC_TRESHOLD_LOW
Definition
hungernotfr.c:6
HungerNotfr::DEC_TRESHOLD_HIGH
const float DEC_TRESHOLD_HIGH
Definition
hungernotfr.c:5
HungerNotfr::INC_TRESHOLD_MED
const float INC_TRESHOLD_MED
Definition
hungernotfr.c:7
HungerNotfr::DEC_TRESHOLD_LOW
const float DEC_TRESHOLD_LOW
Definition
hungernotfr.c:3
HungerNotfr::GetNotifierType
override int GetNotifierType()
Definition
hungernotfr.c:10
HungerNotfr::INC_TRESHOLD_HIGH
const float INC_TRESHOLD_HIGH
Definition
hungernotfr.c:8
NotifierBase::CalculateTendency
int CalculateTendency(float delta, float inctresholdlow, float inctresholdmed, float inctresholdhigh, float dectresholdlow, float dectresholdmed, float dectresholdhigh)
Definition
notifierbase.c:166
NotifierBase::m_Player
PlayerBase m_Player
Definition
notifierbase.c:5
NotifierBase::GetVirtualHud
VirtualHud GetVirtualHud()
Definition
notifierbase.c:49
NotifierBase::NotifierBase
void NotifierBase(NotifiersManager manager)
Definition
notifierbase.c:22
GetElement
DisplayElementBase GetElement(eDisplayElements element_id)
Definition
displaystatus.c:96
EStatLevels
EStatLevels
Definition
estatlevels.c:2
eNotifiers
eNotifiers
Definition
notifiersmanager.c:3
Games
Dayz
scripts
4_world
classes
playernotifiers
notifiers
hungernotfr.c
Generated by
1.17.0