Dayz Explorer 1.28.160049
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 {
15 m_ID = eModifiers.MDF_CONTAMINATION1;
18 m_SyncID = eModifierSyncIDs.MODIFIER_SYNC_CONTAMINATION;
19 }
20
21 override string GetDebugText()
22 {
23 return ("Activate threshold: "+AGENT_THRESHOLD_ACTIVATE + "| " +"Deativate threshold: "+AGENT_THRESHOLD_DEACTIVATE);
24 }
25
26 override protected bool ActivateCondition(PlayerBase player)
27 {
28 return ( player.GetSingleAgentCount(eAgents.CHEMICAL_POISON) >= AGENT_THRESHOLD_ACTIVATE && player.GetSingleAgentCount(eAgents.CHEMICAL_POISON) < AGENT_THRESHOLD_DEACTIVATE );
29 }
30
31 override protected void OnActivate(PlayerBase player)
32 {
33 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_COUGH);
34 }
35
36 override protected bool DeactivateCondition(PlayerBase player)
37 {
38 return !ActivateCondition(player);
39 }
40}
bool DeactivateCondition(PlayerBase player)
override string GetDebugText()
bool ActivateCondition(PlayerBase player)
void OnActivate(PlayerBase player)
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:51
eModifiers
Definition emodifiers.c:2
HeavyMetalMdfr AGENT_THRESHOLD_ACTIVATE
bool m_AnalyticsStatsEnabled
eModifierSyncIDs m_SyncID
float m_TickIntervalActive
float m_TickIntervalInactive
eModifierSyncIDs
const int DEFAULT_TICK_TIME_INACTIVE
enum eModifierSyncIDs DEFAULT_TICK_TIME_ACTIVE