Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
hungernotfr.c
Go to the documentation of this file.
2 {
3  protected const float DEC_TRESHOLD_LOW = 0;
4  protected const float DEC_TRESHOLD_MED = -0.35;
5  protected const float DEC_TRESHOLD_HIGH = -0.57;
6  protected const float INC_TRESHOLD_LOW = 0;
7  protected const float INC_TRESHOLD_MED = 0.35;
8  protected const float INC_TRESHOLD_HIGH = 0.57;
9 
10  void HungerNotfr(NotifiersManager manager)
11  {
12  }
13 
14  override int GetNotifierType()
15  {
16  return eNotifiers.NTF_HUNGRY;
17  }
18 
19  override void DisplayTendency(float delta)
20  {
21  //PrintString("delta:"+delta.ToString());
22  int tendency = CalculateTendency(delta, INC_TRESHOLD_LOW, INC_TRESHOLD_MED, INC_TRESHOLD_HIGH, DEC_TRESHOLD_LOW, DEC_TRESHOLD_MED, DEC_TRESHOLD_HIGH);
23  //GetVirtualHud().SetStatus(eDisplayElements.DELM_TDCY_ENERGY,tendency);
24 
25  //DSLevels level = DetermineLevel( GetObservedValue(), PlayerConstants.THRESHOLD_ENERGY_WARNING, PlayerConstants.THRESHOLD_ENERGY_CRITICAL, PlayerConstants.THRESHOLD_ENERGY_BLINKING, PlayerConstants.THRESHOLD_ENERGY_EXTRA );
26 
27  EStatLevels energy_level = m_Player.GetStatLevelEnergy();
28  DisplayElementTendency dis_elm = DisplayElementTendency.Cast(GetVirtualHud().GetElement(eDisplayElements.DELM_TDCY_ENERGY));
29 
30  if( dis_elm )
31  {
32  dis_elm.SetTendency(tendency);
33  dis_elm.SetSeriousnessLevel(energy_level);
34 
35  }
36 
37  /*
38  Print("-----------------------------------------------------------");
39  Print("water:"+ typename.EnumToString(EStatLevels,m_Player.GetStatLevelWater()));
40  Print("energy:"+ typename.EnumToString(EStatLevels,m_Player.GetStatLevelEnergy()));
41  Print("health:"+ typename.EnumToString(EStatLevels,m_Player.GetStatLevelHealth()));
42  Print("blood:"+ typename.EnumToString(EStatLevels,m_Player.GetStatLevelBlood()));
43  */
44  }
45 
46  override void DisplayBadge()
47  {
48 
49  }
50 
51  override void HideBadge()
52  {
53  }
54 
55 
56  override float GetObservedValue()
57  {
58  return m_Player.GetStatEnergy().Get();
59  }
60 };
GetElement
DisplayElementBase GetElement(eDisplayElements element_id)
Definition: displaystatus.c:95
DisplayElementTendency
Definition: tendencybacteria.c:1
GetVirtualHud
VirtualHud GetVirtualHud()
Definition: notifiersmanager.c:77
NotifiersManager
void NotifiersManager(PlayerBase player)
Definition: notifiersmanager.c:36
HungerNotfr
Definition: hungernotfr.c:1
m_Player
DayZPlayer m_Player
Definition: hand_events.c:42
NotifierBase
Definition: notifierbase.c:1
eNotifiers
eNotifiers
Definition: notifiersmanager.c:1
EStatLevels
EStatLevels
Definition: estatlevels.c:1