3 const int EVENT_1_INTERVAL_MIN = 3;
4 const int EVENT_1_INTERVAL_MAX = 5;
6 const float AGENTS_PER_SEC = 5;
44 MiscGameplayFunctions.TeleportCheck(player, data.SafePositions);
51 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_COUGH);
53 m_NextEvent1 =
Math.RandomFloatInclusive( EVENT_1_INTERVAL_MIN, EVENT_1_INTERVAL_MAX );
68 if(!player.GetCanBeDestroyed())
72 float transmitted =
TransmitAgents(player, AGENTS_PER_SEC * deltaT);
81 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_COUGH);
83 if(
Math.RandomFloat01() < 0.25)
85 m_NextEvent1 =
Math.RandomFloatInclusive( EVENT_1_INTERVAL_MIN * 2, EVENT_1_INTERVAL_MAX * 2 );
89 m_NextEvent1 =
Math.RandomFloatInclusive( EVENT_1_INTERVAL_MIN, EVENT_1_INTERVAL_MAX );
110 int count = player.GetBleedingSourceCount();
112 player.InsertAgent(
eAgents.CHEMICAL_POISON, agent_dose);
118 int free_bs_locations = 0;
119 set<int> list = player.GetBleedingManagerServer().GetBleedingSourcesLocations();
121 foreach(
int location: list)
123 float prot_level = PluginTransmissionAgents.GetProtectionLevelEx(
DEF_CHEMICAL, location, player,
true);
124 float dice_throw =
Math.RandomFloat01();
125 if(dice_throw > prot_level)
127 free_bs_locations = player.GetBleedingManagerServer().GetFreeBleedingSourceBitsByInvLocation(location) | free_bs_locations;
131 int num_of_free_bs =
Math.GetNumberOfSetBits(free_bs_locations);
133 if ( num_of_free_bs > 0 )
135 int random_bs_index =
Math.RandomIntInclusive(0, num_of_free_bs - 1 );
136 int random_bs_bit =
Math.Pow(2,
Math.GetNthBitSet(free_bs_locations,random_bs_index));
137 player.GetBleedingManagerServer().AttemptAddBleedingSourceDirectly(random_bs_bit,
eBleedingSourceType.CONTAMINATED);
143 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
void ApplyAgentsToBleedingSources(PlayerBase player, float deltaT)
const float AGENT_DOSE_PER_BS_SEC
const int EVENT_2_INTERVAL_MAX
float TransmitAgents(PlayerBase player, float count)
const int EVENT_2_INTERVAL_MIN
void BleedingSourceCreateCheck(PlayerBase player)
override void OnTick(PlayerBase player, float deltaT)
override bool DeactivateCondition(PlayerBase player)
override bool ActivateCondition(PlayerBase player)
override void OnDeactivate(PlayerBase player)
override void OnActivate(PlayerBase player)
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
const int AGT_AIRBOURNE_CHEMICAL
bool m_TrackActivatedTime
overall time this modifier was active
void DisableDeactivateCheck()
void DisableActivateCheck()
bool m_AnalyticsStatsEnabled
eModifierSyncIDs m_SyncID
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_ACTIVE_SHORT
const int DEFAULT_TICK_TIME_INACTIVE_LONG
PluginBase GetPlugin(typename plugin_type)