DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл HeavyMetal.c

См. исходные тексты.

Структуры данных

class  HeavyMetalMdfr
 
class  HeavyMetalPhase2Mdfr
 

Функции

override string GetDebugText ()
 
bool ActivateCondition (PlayerBase player)
 
bool DeactivateCondition (PlayerBase player)
 
void OnTick (PlayerBase player, float deltaT)
 
override void Init ()
 Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)
 
void OnActivate (PlayerBase player)
 is called when an inactive modifier gets activated during gameplay, is NOT called on activation upon player server connection(see OnReconnect)
 
void OnDeactivate (PlayerBase player)
 

Переменные

HeavyMetalMdfr AGENT_THRESHOLD_ACTIVATE = 1
 
static const int AGENT_THRESHOLD_DEACTIVATE = 200
 
static const int SHIVER_EVENT_INTERVAL_MIN = 20
 
static const int SHIVER_EVENT_INTERVAL_MAX = 40
 
static const int VOMIT_EVENT_INTERVAL_MIN = 180
 
static const int VOMIT_EVENT_INTERVAL_MAX = 360
 

Функции

◆ ActivateCondition()

bool ActivateCondition ( PlayerBase player)
protected
54 {
55 return (player.GetSingleAgentCount(eAgents.HEAVYMETAL) >= AGENT_THRESHOLD_ACTIVATE && player.GetSingleAgentCount(eAgents.HEAVYMETAL) < AGENT_THRESHOLD_DEACTIVATE);
56 }
eAgents
Definition EAgents.c:3
HeavyMetalMdfr AGENT_THRESHOLD_ACTIVATE
static const int AGENT_THRESHOLD_DEACTIVATE
Definition HeavyMetal.c:43
Definition EntityAI.c:95

Перекрестные ссылки AGENT_THRESHOLD_ACTIVATE и AGENT_THRESHOLD_DEACTIVATE.

◆ DeactivateCondition()

bool DeactivateCondition ( PlayerBase player)
protected
59 {
60 return (player.GetSingleAgentCount(eAgents.HEAVYMETAL) < AGENT_THRESHOLD_ACTIVATE || player.GetSingleAgentCount(eAgents.HEAVYMETAL) > AGENT_THRESHOLD_DEACTIVATE);
61 }

Перекрестные ссылки AGENT_THRESHOLD_ACTIVATE и AGENT_THRESHOLD_DEACTIVATE.

◆ GetDebugText()

override string GetDebugText ( )
49 {
50 return ("Activate threshold: "+AGENT_THRESHOLD_ACTIVATE + "| " +"Deativate threshold: "+AGENT_THRESHOLD_DEACTIVATE);
51 }

Перекрестные ссылки AGENT_THRESHOLD_ACTIVATE и AGENT_THRESHOLD_DEACTIVATE.

◆ Init()

override void Init ( )
protected

Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)

182 {
183 super.Init();
184
185 m_ID = eModifiers.MDF_HEAVYMETAL3;
186 }
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
eModifiers
Definition eModifiers.c:2

Перекрестные ссылки m_ID.

◆ OnActivate()

void OnActivate ( PlayerBase player)
protected

is called when an inactive modifier gets activated during gameplay, is NOT called on activation upon player server connection(see OnReconnect)

204 {
205 super.OnActivate(player);
206
207 player.GetSymptomManager().QueueUpSecondarySymptom(SymptomIDs.SYMPTOM_DEAFNESS_COMPLETE);
208 player.GetSymptomManager().QueueUpSecondarySymptom(SymptomIDs.SYMPTOM_HMP_SEVERE);
209 }

◆ OnDeactivate()

void OnDeactivate ( PlayerBase player)
protected
212 {
213 super.OnDeactivate(player);
214
215 player.GetSymptomManager().RemoveSecondarySymptom(SymptomIDs.SYMPTOM_DEAFNESS_COMPLETE);
216 player.GetSymptomManager().RemoveSecondarySymptom(SymptomIDs.SYMPTOM_HMP_SEVERE);
217 }

◆ OnTick()

void OnTick ( PlayerBase player,
float deltaT )
protected
64 {
65 if (player.GetSingleAgentCount(eAgents.HEAVYMETAL) <= SYMPTOMFALLOFF_THRESHOLD3)
66 {
67 float waterLoss = (deltaT * (WATER_LOSS_HEAVYMETAL_MAX * Math.Max(WATER_LOSS_HEAVYMETAL_MIN, player.GetSingleAgentCountNormalized(eAgents.HEAVYMETAL))));
68 player.GetStatWater().Add(-waterLoss);
69 }
70
71 m_Time += deltaT;
72
73 if (player.GetSingleAgentCount(eAgents.HEAVYMETAL) <= SYMPTOMFALLOFF_THRESHOLD2)
74 {
75 player.m_AgentPool.AddAgent(eAgents.HEAVYMETAL, -0.5);
76 }
77
78 if (player.GetSingleAgentCount(eAgents.HEAVYMETAL) <= SYMPTOMFALLOFF_THRESHOLD3)
79 {
80 if ( m_Time >= m_NextEvent )
81 {
82 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_HAND_SHIVER);
83 m_Time = 0;
84
86 }
87 }
88 }
static const int SHIVER_EVENT_INTERVAL_MIN
Definition HeavyMetal.c:45
static const int SHIVER_EVENT_INTERVAL_MAX
Definition HeavyMetal.c:46
float m_NextEvent
Definition WoundInfection.c:21
float m_Time
Definition WoundInfection.c:22
Definition EnMath.c:7
static proto float Max(float x, float y)
Returns bigger of two given values.
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106

Перекрестные ссылки m_NextEvent, m_Time, Math::Max(), Math::RandomFloatInclusive(), SHIVER_EVENT_INTERVAL_MAX и SHIVER_EVENT_INTERVAL_MIN.

Переменные

◆ AGENT_THRESHOLD_ACTIVATE

HeavyMetalPhase2Mdfr AGENT_THRESHOLD_ACTIVATE = 1

Используется в ActivateCondition(), DeactivateCondition() и GetDebugText().

◆ AGENT_THRESHOLD_DEACTIVATE

static const int AGENT_THRESHOLD_DEACTIVATE = 200
static

Используется в ActivateCondition(), DeactivateCondition() и GetDebugText().

◆ SHIVER_EVENT_INTERVAL_MAX

const int SHIVER_EVENT_INTERVAL_MAX = 40
static

Используется в OnTick().

◆ SHIVER_EVENT_INTERVAL_MIN

const int SHIVER_EVENT_INTERVAL_MIN = 20
static

Используется в OnTick().

◆ VOMIT_EVENT_INTERVAL_MAX

const int VOMIT_EVENT_INTERVAL_MAX = 360
staticprotected

Используется в OnTick().

◆ VOMIT_EVENT_INTERVAL_MIN

const int VOMIT_EVENT_INTERVAL_MIN = 180
staticprotected

Используется в OnTick().