DayZ 1.24
Loading...
Searching...
No Matches
WarmthNotfr Class Reference
Inheritance diagram for WarmthNotfr:
[legend]
Collaboration diagram for WarmthNotfr:
[legend]

Protected Member Functions

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)
 
override void DisplayTendency (float delta)
 
float GetObservedValue ()
 

Private Member Functions

void WarmthNotfr (NotifiersManager manager)
 
override int GetNotifierType ()
 
- Private Member Functions inherited from NotifierBase
int CalculateTendency (float delta, float inctresholdlow, float inctresholdmed, float inctresholdhigh, float dectresholdlow, float dectresholdmed, float dectresholdhigh)
 
eBadgeLevel DetermineBadgeLevel (float value, float lvl_1, float lvl_2, float lvl_3)
 
void DisplayBadge ()
 
void HideBadge ()
 
float GetObservedValue ()
 

Private Attributes

const float DEC_TRESHOLD_LOW = 0
 
const float DEC_TRESHOLD_MED = -0.2
 
const float DEC_TRESHOLD_HIGH = -0.3
 
const float INC_TRESHOLD_LOW = 0
 
const float INC_TRESHOLD_MED = 0.2
 
const float INC_TRESHOLD_HIGH = 0.3
 

Detailed Description

Definition at line 1 of file WarmthNotfr.c.

Constructor & Destructor Documentation

◆ WarmthNotfr()

void WarmthNotfr::WarmthNotfr ( NotifiersManager manager)
inlineprivate

Definition at line 10 of file WarmthNotfr.c.

11 {
13 }
int m_TendencyBufferSize
Definition NotifierBase.c:9

References NotifierBase::m_TendencyBufferSize.

Member Function Documentation

◆ DetermineLevel()

DSLevelsTemp WarmthNotfr::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 )
inlineprotected

Definition at line 21 of file WarmthNotfr.c.

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 }

Referenced by DisplayTendency().

◆ DisplayTendency()

override void WarmthNotfr::DisplayTendency ( float delta)
inlineprotected

Definition at line 41 of file WarmthNotfr.c.

42 {
44
46
48
49 if (dis_elm)
50 {
51 dis_elm.SetTendency(tendency);
52 dis_elm.SetSeriousnessLevel(level);
53 }
54 }
DisplayElementBase GetElement(eDisplayElements element_id)
VirtualHud GetVirtualHud()
int CalculateTendency(float delta, float inctresholdlow, float inctresholdmed, float inctresholdhigh, float dectresholdlow, float dectresholdmed, float dectresholdhigh)
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
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
const float INC_TRESHOLD_MED
Definition WarmthNotfr.c:7

References NotifierBase::CalculateTendency(), DEC_TRESHOLD_HIGH, DEC_TRESHOLD_LOW, DEC_TRESHOLD_MED, DetermineLevel(), GetElement(), GetObservedValue(), NotifierBase::GetVirtualHud(), INC_TRESHOLD_HIGH, INC_TRESHOLD_LOW, INC_TRESHOLD_MED, PlayerConstants::THRESHOLD_HEAT_COMFORT_MINUS_CRITICAL, PlayerConstants::THRESHOLD_HEAT_COMFORT_MINUS_EMPTY, PlayerConstants::THRESHOLD_HEAT_COMFORT_MINUS_WARNING, PlayerConstants::THRESHOLD_HEAT_COMFORT_PLUS_CRITICAL, PlayerConstants::THRESHOLD_HEAT_COMFORT_PLUS_EMPTY, and PlayerConstants::THRESHOLD_HEAT_COMFORT_PLUS_WARNING.

◆ GetNotifierType()

override int WarmthNotfr::GetNotifierType ( )
inlineprivate

Definition at line 15 of file WarmthNotfr.c.

16 {
17 return eNotifiers.NTF_WARMTH;
18 }
eNotifiers

◆ GetObservedValue()

float WarmthNotfr::GetObservedValue ( )
inlineprotected

Definition at line 56 of file WarmthNotfr.c.

57 {
58 return m_Player.GetStatHeatComfort().Get();
59 }
PlayerBase m_Player
Definition NotifierBase.c:6

References NotifierBase::m_Player.

Referenced by DisplayTendency().

Member Data Documentation

◆ DEC_TRESHOLD_HIGH

const float WarmthNotfr::DEC_TRESHOLD_HIGH = -0.3
private

Definition at line 5 of file WarmthNotfr.c.

Referenced by DisplayTendency().

◆ DEC_TRESHOLD_LOW

const float WarmthNotfr::DEC_TRESHOLD_LOW = 0
private

Definition at line 3 of file WarmthNotfr.c.

Referenced by DisplayTendency().

◆ DEC_TRESHOLD_MED

const float WarmthNotfr::DEC_TRESHOLD_MED = -0.2
private

Definition at line 4 of file WarmthNotfr.c.

Referenced by DisplayTendency().

◆ INC_TRESHOLD_HIGH

const float WarmthNotfr::INC_TRESHOLD_HIGH = 0.3
private

Definition at line 8 of file WarmthNotfr.c.

Referenced by DisplayTendency().

◆ INC_TRESHOLD_LOW

const float WarmthNotfr::INC_TRESHOLD_LOW = 0
private

Definition at line 6 of file WarmthNotfr.c.

Referenced by DisplayTendency().

◆ INC_TRESHOLD_MED

const float WarmthNotfr::INC_TRESHOLD_MED = 0.2
private

Definition at line 7 of file WarmthNotfr.c.

Referenced by DisplayTendency().


The documentation for this class was generated from the following file: