44 MiscGameplayFunctions.TeleportCheck(player, data.
SafePositions);
50 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_COUGH);
67 if(!player.GetCanBeDestroyed())
80 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_COUGH);
109 int count = player.GetBleedingSourceCount();
111 player.InsertAgent(
eAgents.CHEMICAL_POISON, agent_dose);
117 int free_bs_locations = 0;
118 set<int> list = player.GetBleedingManagerServer().GetBleedingSourcesLocations();
120 foreach(
int location: list)
122 float prot_level = PluginTransmissionAgents.GetProtectionLevelEx(
DEF_CHEMICAL, location, player,
true);
124 if(dice_throw > prot_level)
126 free_bs_locations = player.GetBleedingManagerServer().GetFreeBleedingSourceBitsByInvLocation(location) | free_bs_locations;
132 if ( num_of_free_bs > 0 )
136 player.GetBleedingManagerServer().AttemptAddBleedingSourceDirectly(random_bs_bit,
eBleedingSourceType.CONTAMINATED);
142 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
protected int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
bool m_TrackActivatedTime
void DisableDeactivateCheck()
void DisableActivateCheck()
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)
override bool DeactivateCondition(PlayerBase player)
override void OnActivate(PlayerBase player)
void ApplyAgentsToBleedingSources(PlayerBase player, float deltaT)
float TransmitAgents(PlayerBase player, float count)
void BleedingSourceCreateCheck(PlayerBase player)
const int EVENT_2_INTERVAL_MIN
const int EVENT_1_INTERVAL_MAX
protected float m_NextEvent2
protected float m_NextEvent1
override void OnTick(PlayerBase player, float deltaT)
override bool ActivateCondition(PlayerBase player)
const int EVENT_2_INTERVAL_MAX
override void OnDeactivate(PlayerBase player)
const int EVENT_1_INTERVAL_MIN
const float AGENT_DOSE_PER_BS_SEC
const float AGENTS_PER_SEC
static JsonDataContaminatedAreas GetData()
ref array< ref array< float > > SafePositions
const int AGT_AIRBOURNE_CHEMICAL
static proto float Pow(float v, float power)
Return power of v ^ power.
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
static proto int GetNthBitSet(int value, int n)
returns the the index of n-th bit set in a bit mask counting from the right, for instance,...
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
static proto int GetNumberOfSetBits(int i)
returns the number of bits set in a bitmask i