DayZ 1.24
Loading...
Searching...
No Matches
WarmthNotfr.c
Go to the documentation of this file.
2{
3 private const float DEC_TRESHOLD_LOW = 0;
4 private const float DEC_TRESHOLD_MED = -0.2;
5 private const float DEC_TRESHOLD_HIGH = -0.3;
6 private const float INC_TRESHOLD_LOW = 0;
7 private const float INC_TRESHOLD_MED = 0.2;
8 private const float INC_TRESHOLD_HIGH = 0.3;
9
14
15 override int GetNotifierType()
16 {
17 return eNotifiers.NTF_WARMTH;
18 }
19
20
22 {
24
25 if (value < 0)
26 {
27 if (value < m_warning_treshold) level = DSLevelsTemp.WARNING_MINUS;
28 if (value < m_critical_treshold) level = DSLevelsTemp.CRITICAL_MINUS;
29 if (value <= m_empty_treshold) level = DSLevelsTemp.BLINKING_MINUS;
30 }
31 else
32 {
33 if (value > p_warning_treshold) level = DSLevelsTemp.WARNING_PLUS;
34 if (value > p_critical_treshold) level = DSLevelsTemp.CRITICAL_PLUS;
35 if (value >= p_empty_treshold) level = DSLevelsTemp.BLINKING_PLUS;
36 }
37
38 return level;
39 }
40
55
56 override protected float GetObservedValue()
57 {
58 return m_Player.GetStatHeatComfort().Get();
59 }
60};
DisplayElementBase GetElement(eDisplayElements element_id)
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)
int m_TendencyBufferSize
Definition NotifierBase.c:9
static const float THRESHOLD_HEAT_COMFORT_MINUS_WARNING
static const float THRESHOLD_HEAT_COMFORT_PLUS_WARNING
static const float THRESHOLD_HEAT_COMFORT_MINUS_CRITICAL
static const float THRESHOLD_HEAT_COMFORT_PLUS_EMPTY
static const float THRESHOLD_HEAT_COMFORT_MINUS_EMPTY
static const float THRESHOLD_HEAT_COMFORT_PLUS_CRITICAL
const float DEC_TRESHOLD_LOW
Definition WarmthNotfr.c:3
const float INC_TRESHOLD_LOW
Definition WarmthNotfr.c:6
const float DEC_TRESHOLD_HIGH
Definition WarmthNotfr.c:5
const float INC_TRESHOLD_HIGH
Definition WarmthNotfr.c:8
const float DEC_TRESHOLD_MED
Definition WarmthNotfr.c:4
void WarmthNotfr(NotifiersManager manager)
Definition WarmthNotfr.c:10
DSLevelsTemp DetermineLevel(float value, float m_warning_treshold, float m_critical_treshold, float m_empty_treshold, float p_warning_treshold, float p_critical_treshold, float p_empty_treshold)
Definition WarmthNotfr.c:21
float GetObservedValue()
Definition WarmthNotfr.c:56
override void DisplayTendency(float delta)
Definition WarmthNotfr.c:41
override int GetNotifierType()
Definition WarmthNotfr.c:15
const float INC_TRESHOLD_MED
Definition WarmthNotfr.c:7