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

Protected Member Functions

float GetObservedValue ()
 

Private Member Functions

void ThirstNotfr (NotifiersManager manager)
 
override int GetNotifierType ()
 
override void DisplayTendency (float delta)
 
override void DisplayBadge ()
 
override void HideBadge ()
 
- 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 HYDRATED_TRESHOLD = 3500
 
const float THIRSTY_TRESHOLD = 2500
 
const float VERY_THIRSTY_TRESHOLD = 1500
 
const float FATALLY_THIRSTY_TRESHOLD = 0
 
const float DEC_TRESHOLD_LOW = 0
 
const float DEC_TRESHOLD_MED = -0.2
 
const float DEC_TRESHOLD_HIGH = -0.85
 
const float INC_TRESHOLD_LOW = 0
 
const float INC_TRESHOLD_MED = 0.2
 
const float INC_TRESHOLD_HIGH = 0.85
 

Detailed Description

Definition at line 1 of file ThirstNotfr.c.

Constructor & Destructor Documentation

◆ ThirstNotfr()

void ThirstNotfr::ThirstNotfr ( NotifiersManager manager)
inlineprivate

Definition at line 14 of file ThirstNotfr.c.

15 {
16 }

Member Function Documentation

◆ DisplayBadge()

override void ThirstNotfr::DisplayBadge ( )
inlineprivate

Definition at line 42 of file ThirstNotfr.c.

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 }
PlayerBase m_Player
Definition NotifierBase.c:6
const float THIRSTY_TRESHOLD
Definition ThirstNotfr.c:4
const float HYDRATED_TRESHOLD
Definition ThirstNotfr.c:3
const float FATALLY_THIRSTY_TRESHOLD
Definition ThirstNotfr.c:6
const float VERY_THIRSTY_TRESHOLD
Definition ThirstNotfr.c:5

References FATALLY_THIRSTY_TRESHOLD, HYDRATED_TRESHOLD, NotifierBase::m_Player, THIRSTY_TRESHOLD, and VERY_THIRSTY_TRESHOLD.

◆ DisplayTendency()

override void ThirstNotfr::DisplayTendency ( float delta)
inlineprivate

Definition at line 24 of file ThirstNotfr.c.

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 }
DisplayElementBase GetElement(eDisplayElements element_id)
EStatLevels
Definition EStatLevels.c:2
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 DEC_TRESHOLD_LOW
Definition ThirstNotfr.c:7
const float INC_TRESHOLD_HIGH
Definition ThirstNotfr.c:12

References NotifierBase::CalculateTendency(), DEC_TRESHOLD_HIGH, DEC_TRESHOLD_LOW, DEC_TRESHOLD_MED, GetElement(), NotifierBase::GetVirtualHud(), INC_TRESHOLD_HIGH, INC_TRESHOLD_LOW, INC_TRESHOLD_MED, and NotifierBase::m_Player.

◆ GetNotifierType()

override int ThirstNotfr::GetNotifierType ( )
inlineprivate

Definition at line 18 of file ThirstNotfr.c.

19 {
20 return eNotifiers.NTF_THIRSTY;
21 }
eNotifiers

◆ GetObservedValue()

float ThirstNotfr::GetObservedValue ( )
inlineprotected

Definition at line 69 of file ThirstNotfr.c.

70 {
71 return m_Player.GetStatWater().Get();
72 }

References NotifierBase::m_Player.

◆ HideBadge()

override void ThirstNotfr::HideBadge ( )
inlineprivate

Definition at line 63 of file ThirstNotfr.c.

64 {
65
66 //GetVirtualHud().SetStatus(eDisplayElements.DELM_NTFR_THIRST,DELM_LVL_0);
67 }

Member Data Documentation

◆ DEC_TRESHOLD_HIGH

const float ThirstNotfr::DEC_TRESHOLD_HIGH = -0.85
private

Definition at line 9 of file ThirstNotfr.c.

Referenced by DisplayTendency().

◆ DEC_TRESHOLD_LOW

const float ThirstNotfr::DEC_TRESHOLD_LOW = 0
private

Definition at line 7 of file ThirstNotfr.c.

Referenced by DisplayTendency().

◆ DEC_TRESHOLD_MED

const float ThirstNotfr::DEC_TRESHOLD_MED = -0.2
private

Definition at line 8 of file ThirstNotfr.c.

Referenced by DisplayTendency().

◆ FATALLY_THIRSTY_TRESHOLD

const float ThirstNotfr::FATALLY_THIRSTY_TRESHOLD = 0
private

Definition at line 6 of file ThirstNotfr.c.

Referenced by DisplayBadge().

◆ HYDRATED_TRESHOLD

const float ThirstNotfr::HYDRATED_TRESHOLD = 3500
private

Definition at line 3 of file ThirstNotfr.c.

Referenced by DisplayBadge().

◆ INC_TRESHOLD_HIGH

const float ThirstNotfr::INC_TRESHOLD_HIGH = 0.85
private

Definition at line 12 of file ThirstNotfr.c.

Referenced by DisplayTendency().

◆ INC_TRESHOLD_LOW

const float ThirstNotfr::INC_TRESHOLD_LOW = 0
private

Definition at line 10 of file ThirstNotfr.c.

Referenced by DisplayTendency().

◆ INC_TRESHOLD_MED

const float ThirstNotfr::INC_TRESHOLD_MED = 0.2
private

Definition at line 11 of file ThirstNotfr.c.

Referenced by DisplayTendency().

◆ THIRSTY_TRESHOLD

const float ThirstNotfr::THIRSTY_TRESHOLD = 2500
private

Definition at line 4 of file ThirstNotfr.c.

Referenced by DisplayBadge().

◆ VERY_THIRSTY_TRESHOLD

const float ThirstNotfr::VERY_THIRSTY_TRESHOLD = 1500
private

Definition at line 5 of file ThirstNotfr.c.

Referenced by DisplayBadge().


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