DayZ 1.24
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
17
18 override int GetNotifierType()
19 {
20 return eNotifiers.NTF_THIRSTY;
21 }
22
23
24 override void DisplayTendency(float delta)
25 {
26 //PrintString(delta.ToString());
28 //GetVirtualHud().SetStatus(eDisplayElements.DELM_TDCY_WATER,tendency);
29
30 //DSLevels level = DetermineLevel( GetObservedValue(), PlayerConstants.THRESHOLD_WATER_WARNING, PlayerConstants.THRESHOLD_WATER_CRITICAL, PlayerConstants.THRESHOLD_WATER_BLINKING, PlayerConstants.THRESHOLD_WATER_EXTRA);
31 EStatLevels water_level = m_Player.GetStatLevelWater();
33
34 if (dis_elm)
35 {
36 dis_elm.SetTendency(tendency);
37 dis_elm.SetSeriousnessLevel(water_level);
38
39 }
40 }
41
42 override void DisplayBadge()
43 {
44 float water = m_Player.GetStatWater().Get();
46 {
47 //GetVirtualHud().SetStatus(eDisplayElements.DELM_NTFR_THIRST,DELM_LVL_1);
48 }
49 else if (water <= THIRSTY_TRESHOLD)
50 {
51 //GetVirtualHud().SetStatus(eDisplayElements.DELM_NTFR_THIRST,DELM_LVL_2);
52 }
53 else if (water <= VERY_THIRSTY_TRESHOLD)
54 {
55 //GetVirtualHud().SetStatus(eDisplayElements.DELM_NTFR_THIRST,DELM_LVL_3);
56 }
58 {
59 //GetVirtualHud().SetStatus(eDisplayElements.DELM_NTFR_THIRST,DELM_LVL_4);
60 }
61 }
62
63 override void HideBadge()
64 {
65
66 //GetVirtualHud().SetStatus(eDisplayElements.DELM_NTFR_THIRST,DELM_LVL_0);
67 }
68
69 override protected float GetObservedValue()
70 {
71 return m_Player.GetStatWater().Get();
72 }
73};
DisplayElementBase GetElement(eDisplayElements element_id)
EStatLevels
Definition EStatLevels.c:2
void NotifiersManager(PlayerBase player)
eNotifiers
PlayerBase m_Player
Definition NotifierBase.c:6
VirtualHud GetVirtualHud()
int CalculateTendency(float delta, float inctresholdlow, float inctresholdmed, float inctresholdhigh, float dectresholdlow, float dectresholdmed, float dectresholdhigh)
const float INC_TRESHOLD_MED
Definition ThirstNotfr.c:11
const float INC_TRESHOLD_LOW
Definition ThirstNotfr.c:10
const float DEC_TRESHOLD_HIGH
Definition ThirstNotfr.c:9
const float DEC_TRESHOLD_MED
Definition ThirstNotfr.c:8
const float THIRSTY_TRESHOLD
Definition ThirstNotfr.c:4
override void DisplayTendency(float delta)
Definition ThirstNotfr.c:24
const float DEC_TRESHOLD_LOW
Definition ThirstNotfr.c:7
float GetObservedValue()
Definition ThirstNotfr.c:69
const float HYDRATED_TRESHOLD
Definition ThirstNotfr.c:3
override void HideBadge()
Definition ThirstNotfr.c:63
override int GetNotifierType()
Definition ThirstNotfr.c:18
void ThirstNotfr(NotifiersManager manager)
Definition ThirstNotfr.c:14
override void DisplayBadge()
Definition ThirstNotfr.c:42
const float FATALLY_THIRSTY_TRESHOLD
Definition ThirstNotfr.c:6
const float INC_TRESHOLD_HIGH
Definition ThirstNotfr.c:12
const float VERY_THIRSTY_TRESHOLD
Definition ThirstNotfr.c:5