Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
thirstnotfr.c
Go to the documentation of this file.
2{
3 private const float HYDRATED_TRESHOLD = 3500;
4 private const float THIRSTY_TRESHOLD = 2500;
5 private const float VERY_THIRSTY_TRESHOLD = 1500;
6 private const float FATALLY_THIRSTY_TRESHOLD = 0;
7 private const float DEC_TRESHOLD_LOW = 0;
8 private const float DEC_TRESHOLD_MED = -0.2;
9 private const float DEC_TRESHOLD_HIGH = -0.85;
10 private const float INC_TRESHOLD_LOW = 0;
11 private const float INC_TRESHOLD_MED = 0.2;
12 private const float INC_TRESHOLD_HIGH = 0.85;
13
14 override int GetNotifierType()
15 {
16 return eNotifiers.NTF_THIRSTY;
17 }
18
19 override void DisplayTendency(float delta)
20 {
21 //PrintString(delta.ToString());
23 //GetVirtualHud().SetStatus(eDisplayElements.DELM_TDCY_WATER,tendency);
24
25 //DSLevels level = DetermineLevel( GetObservedValue(), PlayerConstants.THRESHOLD_WATER_WARNING, PlayerConstants.THRESHOLD_WATER_CRITICAL, PlayerConstants.THRESHOLD_WATER_BLINKING, PlayerConstants.THRESHOLD_WATER_EXTRA);
26 EStatLevels water_level = m_Player.GetStatLevelWater();
27 DisplayElementTendency dis_elm = DisplayElementTendency.Cast(GetVirtualHud().GetElement(eDisplayElements.DELM_TDCY_WATER));
28
29 if( dis_elm )
30 {
31 dis_elm.SetTendency(tendency);
32 dis_elm.SetSeriousnessLevel(water_level);
33 }
34 }
35
36 override protected float GetObservedValue()
37 {
38 return m_Player.GetStatWater().Get();
39 }
40};
int CalculateTendency(float delta, float inctresholdlow, float inctresholdmed, float inctresholdhigh, float dectresholdlow, float dectresholdmed, float dectresholdhigh)
PlayerBase m_Player
Definition notifierbase.c:5
VirtualHud GetVirtualHud()
void NotifierBase(NotifiersManager manager)
const float DEC_TRESHOLD_MED
Definition thirstnotfr.c:8
const float THIRSTY_TRESHOLD
Definition thirstnotfr.c:4
float GetObservedValue()
Definition thirstnotfr.c:36
const float HYDRATED_TRESHOLD
Definition thirstnotfr.c:3
override void DisplayTendency(float delta)
Definition thirstnotfr.c:19
const float INC_TRESHOLD_LOW
Definition thirstnotfr.c:10
const float DEC_TRESHOLD_HIGH
Definition thirstnotfr.c:9
const float INC_TRESHOLD_MED
Definition thirstnotfr.c:11
const float DEC_TRESHOLD_LOW
Definition thirstnotfr.c:7
override int GetNotifierType()
Definition thirstnotfr.c:14
const float INC_TRESHOLD_HIGH
Definition thirstnotfr.c:12
const float FATALLY_THIRSTY_TRESHOLD
Definition thirstnotfr.c:6
const float VERY_THIRSTY_TRESHOLD
Definition thirstnotfr.c:5
DisplayElementBase GetElement(eDisplayElements element_id)
EStatLevels
Definition estatlevels.c:2
eNotifiers