8class PluginTransmissionAgents
extends PluginBase
12 bool m_IsConstructed =
false;
29 m_AgentList.Insert(
agent.GetAgentType(),
agent);
37 for (
int i = 0;
i < m_AgentList.Count();
i++)
56 m_IsConstructed =
true;
63 return m_AgentList.Get(
agent_id).GetName();
79 if (!m_AgentList.Get(
agent_id))
return 0;
80 return m_AgentList.Get(
agent_id).GetTransferabilityIn();
86 if (!m_AgentList.Get(
agent_id))
return true;
87 return m_AgentList.Get(
agent_id).GrowDuringAntibioticsAttack(
player);
93 if (!m_AgentList.Get(
agent_id))
return true;
99 if (!m_AgentList.Get(
agent_id))
return true;
105 if (!m_AgentList.Get(
agent_id))
return true;
112 if (!m_AgentList.Get(
agent_id))
return 0;
113 return m_AgentList.Get(
agent_id).GetAntiboticsResistance();
119 if (!m_AgentList.Get(
agent_id))
return 0;
120 return m_AgentList.Get(
agent_id).GetAntibioticsResistanceEx(
player);
125 if (!m_AgentList.Get(
agent_id))
return 0;
126 return m_AgentList.Get(
agent_id).GetTransferabilityOut();
131 if (!m_AgentList.Get(
agent_id))
return 0;
132 return m_AgentList.Get(
agent_id).GetTransferabilityAirOut();
144 return m_AgentList.Get(
agent_id).GetInvasibility();
152 return m_AgentList.Get(
agent_id).GetDigestibility();
159 return m_AgentList.Get(
agent_id).GetDieOffSpeed();
166 return m_AgentList.Get(
agent_id).GetPotency();
171 if (!m_AgentList.Get(
agent_id))
return 0;
172 return m_AgentList.Get(
agent_id).GetMaxCount();
provides access to slot configuration
float InjectAgentWithPlayerDose(EntityAI target, int agent, float protection, float dose_size, int inject_type)
will add agent to a given target
static int GetAgentMaxCount(int agent_id)
void RemoveAllAgents(EntityAI target)
static float GetProtectionLevelEx(int type, int slot, Man player, bool consider_filter=true, int system=0)
map< int, string > GetSimpleAgentList()
float GetAgentInvasibilityEx(int agent_id, PlayerBase player)
float CalculateAgentsToTransmit(int agent_id, float protection, int dose_size, int inject_type)
void ConstructSimpleAgentList()
bool DetermineChanceToTransmit(int agent_id, float protection, int inject_type)
void TransmitAgents(EntityAI source, EntityAI target, int pathway, int dose_size=1000)
float GetAgentDigestibility(int agent_id)
float GetDieOffSpeed(int agent_id)
static void RemoveAgent(EntityAI target, int agent_id)
void InjectAgentsWithPlayer(EntityAI target, int agents, float protection, int dose_size, int inject_type)
will add agents to a given target, using chance of transmission and full dose size if chance succeeds
static ref map< int, ref AgentBase > m_AgentList
float GetAgentTransferabilityAirOut(int agent_id)
float GetAgentInvasibility(int agent_id)
EStatLevels GetPotency(int agent_id)
void InjectAgentsWithPlayerCount(EntityAI target, int agents, float protection, int dose_size, int inject_type)
will add agents to a given target, with no probability, but the dose size is modified by m_Transferab...
void InjectAgentsWithoutPlayer(EntityAI target, int agents)
float GetAgentDieOffSpeedEx(int agent_id, PlayerBase player)
float GetProtectionLevel(int type, int slot, Man player)
bool GrowDuringAntibioticsAttack(int agent_id, PlayerBase player)
static void BuildAgentArray(int agents, array< int > agents_out)
void RegisterAgent(AgentBase agent)
map< int, ref AgentBase > GetAgentList()
float GetAgentAntiboticsResistanceEx(int agent_id, PlayerBase player)
float TransmitAgentsEx(EntityAI source, EntityAI target, int pathway, int dose_size=1000, int agents=0)
float GetAgentAntiboticsResistance(int agent_id)
EStatLevels GetAgentPotencyEx(int agent_id, PlayerBase player)
void PluginTransmissionAgents()
static string GetNameByID(int agent_id)
float GetAgentTransferabilityIn(int agent_id)
ref map< int, string > m_SimpleAgentList
float GetAgentTransferabilityOut(int agent_id)
const int AGT_UACTION_CONSUME
const int AGT_ITEM_TO_FLESH
const int AGT_UACTION_TOUCH
const int AGT_AIRBOURNE_BIOLOGICAL
const int AGT_TRANSFER_COPY
const int AGT_UACTION_TO_PLAYER
const int AGT_AIRBOURNE_CHEMICAL
const int AGT_UACTION_TO_ITEM
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
static proto float Max(float x, float y)
Returns bigger of two given values.
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 proto float Pow(float v, float power)
Return power of v ^ power.
static proto int GetNumberOfSetBits(int i)
returns the number of bits set in a bitmask i