DayZ 1.24
Loading...
Searching...
No Matches
Contamination.c
Go to the documentation of this file.
2{
3 static const int AGENT_THRESHOLD_ACTIVATE = 1;
4 static const int AGENT_THRESHOLD_DEACTIVATE = 100;
5
6 static const int EVENT_1_INTERVAL_MIN = 20;
7 static const int EVENT_1_INTERVAL_MAX = 40;
8
9 protected float m_NextEvent;
10 protected float m_Time;
11
12 override void Init()
13 {
14 m_ID = eModifiers.MDF_CONTAMINATION1;
17 m_SyncID = eModifierSyncIDs.MODIFIER_SYNC_CONTAMINATION;
18 }
19
20 override string GetDebugText()
21 {
22 return ("Activate threshold: " + AGENT_THRESHOLD_ACTIVATE + "| " + "Deativate threshold: " + AGENT_THRESHOLD_DEACTIVATE);
23 }
24
25 override protected bool ActivateCondition(PlayerBase player)
26 {
27 return (player.GetSingleAgentCount(eAgents.CHEMICAL_POISON) >= AGENT_THRESHOLD_ACTIVATE && player.GetSingleAgentCount(eAgents.CHEMICAL_POISON) < AGENT_THRESHOLD_DEACTIVATE);
28 }
29
30 override protected void OnActivate(PlayerBase player)
31 {
32 //player.IncreaseDiseaseCount();
34 }
35
36 override protected void OnDeactivate(PlayerBase player)
37 {
38 //player.DecreaseDiseaseCount();
39 }
40
41 override protected bool DeactivateCondition(PlayerBase player)
42 {
44 }
45
46 override protected void OnTick(PlayerBase player, float deltaT)
47 {
48 /*
49 m_Time += deltaT;
50
51 if ( m_Time >= m_NextEvent )
52 {
53 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_COUGH);
54 m_Time = 0;
55 m_NextEvent = Math.RandomFloatInclusive( EVENT_1_INTERVAL_MIN, EVENT_1_INTERVAL_MAX );
56 }
57 */
58 }
59};
eAgents
Definition EAgents.c:3
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
eModifierSyncIDs m_SyncID
float m_TickIntervalActive
float m_TickIntervalInactive
eModifierSyncIDs
const int DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_ACTIVE
bool DeactivateCondition(PlayerBase player)
void OnTick(PlayerBase player, float deltaT)
override string GetDebugText()
void OnDeactivate(PlayerBase player)
static const int AGENT_THRESHOLD_DEACTIVATE
static const int AGENT_THRESHOLD_ACTIVATE
static const int EVENT_1_INTERVAL_MAX
bool ActivateCondition(PlayerBase player)
void OnActivate(PlayerBase player)
static const int EVENT_1_INTERVAL_MIN
Definition EnMath.c:7
eModifiers
Definition eModifiers.c:2
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106