DIFF

class PluginTransmissionAgentsSource

PluginTransmissionAgents PluginBase

All members, including inherited

Plugin interface for controlling of agent pool system - access to specific agent attributes - various transmission operations

Constructors 1

void PluginTransmissionAgents()
References RegisterAgent()

Members 3

ref map<int, string> m_SimpleAgentList = new map<int, string>

simple <eAgents, agentName> pair

bool m_IsConstructed = false
Referenced by GetSimpleAgentList()

Methods 35

void RegisterAgent(AgentBase agent)

Registers new agent into system

agent
New agent class
void ConstructSimpleAgentList()

Builds simplified list of agents in <id, name> format

Referenced by GetSimpleAgentList()
map<int, ref AgentBase> GetAgentList()

Returns map of all registered agent classes

Returns: map<int, ref AgentBase> map of agent classes

References m_AgentList
map<int, string> GetSimpleAgentList()

Returns map of all registered agents in simplified format(for non-gameplay purposas mainly)

Returns: map<int, ref AgentBase> map of agent classes

static string GetNameByID(int agent_id)

Returns agent's name from given id

agent_id
Id of agent (see eAgents enum)

Returns: Agent name

References map.Get(), GetName(), and m_AgentList
void RemoveAllAgents(EntityAI target)

Removes all agents from given entity

target
Entity to remove agents from
static void RemoveAgent(EntityAI target, int agent_id)

Removes given agent from given entity

target
Entity to remove agents from
agent_id
Id of agent (see eAgents enum)
protected float GetAgentTransferabilityIn(int agent_id)

Returns transferabilityIn attribute for given agent

agent_id
Id of agent (see eAgents enum)

Returns: AgentBase::m_TransferabilityIn

bool GrowDuringMedicalDrugsAttack(int agentId, EMedicalDrugsType drugType, PlayerBase player)
float GetDieOffSpeed(int agent_id)

Returns dieOfSpeed attribute for given agent (see GetDieOffSpeedEx())

References map.Get(), GetDieOffSpeed(), and m_AgentList
float GetAgentDieOffSpeedEx(int agent_id, PlayerBase player)

Returns dieOfSpeed attribute for given agent

agent_id
Id of agent (see eAgents enum)
player
Actual player reference

Returns: AgentBase::m_DieOffSpeed

References map.Get(), GetDieOffSpeedEx(), and m_AgentList
EStatLevels GetPotency(int agent_id)

Returns potency attribute for given agent (see GetAgentPotencyEx())

References map.Get(), GetPotency(), and m_AgentList
EStatLevels GetAgentPotencyEx(int agent_id, PlayerBase player)

Returns potency attribute for given agent

agent_id
Id of agent (see eAgents enum)
player
Actual player reference

Returns: AgentBase::m_Potency

References map.Get(), GetPotencyEx(), and m_AgentList
float GetAgentInvasibilityEx(int agent_id, PlayerBase player)

Returns invasibility attribute for given agent

agent_id
Id of agent (see eAgents enum)
player
Actual player reference

Returns: AgentBase::m_Invasibility

References map.Get(), GetInvasibilityEx(), and m_AgentList
int GetAgentSpecificDrugResistance(int agent_id, EMedicalDrugsType drugType, PlayerBase player)

Returns the resistance to the specific drug

float GetAgentAntiboticsResistance(int agent_id)

Returns antibiotics resistance attribute for given agent see GetAgentAntiboticsResistanceEx()

float GetAgentAntiboticsResistanceEx(int agent_id, PlayerBase player)

Returns antibiotics resistance attribute for given agent

agent_id
Id of agent (see eAgents enum)
player
Actual player reference

Returns: AgentBase::m_AntibioticsResistance

References map.Get(), GetAntibioticsResistanceEx(), and m_AgentList
protected float GetAgentTransferabilityOut(int agent_id)

Returns transferabilityOut attribute for given agent

agent_id
Id of agent (see eAgents enum)

Returns: AgentBase::m_TransferabilityOut

protected float GetAgentTransferabilityAirOut(int agent_id)

Returns transferabilitAiryOut attribute for given agent

agent_id
Id of agent (see eAgents enum)

Returns: AgentBase::m_TransferabilityAirOut

float GetAgentInvasibility(int agent_id)

Returns invasibility attribute for given agent

agent_id
Id of agent (see eAgents enum)

Returns: AgentBase::m_Invasibility

float GetAgentDigestibility(int agent_id)

Returns stomach digetibility attribute for given agent (see GetAgentDigestibilityEx())

References map.Get(), GetDigestibility(), and m_AgentList
float GetAgentDigestibilityEx(int agent_id, PlayerBase player)

Returns stomach digetibility attribute for given agent

agent_id
Id of agent (see eAgents enum)
player
Actual player reference

Returns: AgentBase::m_Digestibility

References map.Get(), GetDigestibilityEx(), and m_AgentList
static int GetAgentMaxCount(int agent_id)

Returns max count attribute for given agent

agent_id
Id of agent (see eAgents enum)

Returns: AgentBase::m_MaxCount

References map.Get(), GetMaxCount(), and m_AgentList
float TransmitAgentsEx(EntityAI source, EntityAI target, int pathway, int dose_size = 1000, int agents = 0)

Process transmission of agents between entities (for specified transmission type)

source
Entity to transfer agents from
target
Entity to transfer agents to
pathway
Type of transmission used
dose_size
Number of agents to be transmitted
agents
Bit mask specifing agents to transmit

Returns: count Number of transmitted agents

void TransmitAgents(EntityAI source, EntityAI target, int pathway, int dose_size = 1000)

Process transmission of agents between entities (for specified transmission type) (see TransmitAgentsEx()))

protected void InjectAgentsWithoutPlayer(EntityAI target, int agents)

Injects specified agents directly to target

target
Entity to inject agents to
agents
Bit mask with information about agents
Referenced by TransmitAgentsEx()
protected void InjectAgentsWithPlayer(EntityAI target, int agents, float protection, int dose_size, int inject_type)

Injects agents to a given target, using chance of transmission and full dose size if chance succeeds

target
Entity to inject agents to
agents
Bit mask with information about agents
protection
Protection size used for chance generation <0.0; 1.0>
dose_size
Number of agents to be transmitted
inject_type
Type of transmission
Referenced by TransmitAgentsEx()
protected void InjectAgentsWithPlayerCount(EntityAI target, int agents, float protection, int dose_size, int inject_type)

Injects agents to a given target, with no probability, but the dose size is modified by m_TransferabilityOut of the agent

target
Entity to inject agents to
agents
Bit mask with information about agents
protection
Protection size used for chance generation <0.0; 1.0>
dose_size
Number of agents to be transmitted
inject_type
Type of transmission
Referenced by TransmitAgentsEx()
protected float InjectAgentWithPlayerDose(EntityAI target, int agent, float protection, float dose_size, int inject_type)

Injects agent to a given target

target
Entity to inject agents to
agents
Bit mask with information about agents
protection
Protection size used for chance generation <0.0; 1.0>
dose_size
Number of agents to be transmitted
inject_type
Type of transmission

Returns: count Number of injected agents (dose_size might be shrinked by chance from protection)

Referenced by TransmitAgentsEx()
static void BuildAgentArray(int agents, array<int> agents_out)
References array.Insert()
static float GetProtectionLevelEx(int type, int slot, Man player, bool consider_filter = true, int system = 0)

Protection level of an attachment against enviromental hazard (mask/filters for example)

type
Type of protection (see DEF_BIOLOGICAL in constants.c for example)
slot
Inventory slot id
player
Player reference
consider_filter
(unused parameter for now)
system
(unused parameter for now)

Returns: Attachment protechtion level

protected float GetProtectionLevel(int type, int slot, Man player)

Protection level of an attachment against enviromental hazard (mask/filters for example) (see GetProtectionLevelEx())

Referenced by TransmitAgentsEx()
protected float CalculateAgentsToTransmit(int agent_id, float protection, int dose_size, int inject_type)

Calculates number of agents that can be transmitted (based on given dose_size)

agent_id
Id of agent (see eAgents enum)
protection
Protection size used for chance generation <0.0; 1.0>
dose_size
Number of agents to be transmitted
inject_type
Type of transmission

Returns: Number of agents that will be transmitted based on the processing of attributes

protected bool DetermineChanceToTransmit(int agent_id, float protection, int inject_type)

Agent transmission chance processing

agent_id
Id of agent (see eAgents enum)
protection
Protection size used for chance generation <0.0; 1.0>
inject_type
Type of transmission

Returns: true if there is a chance to transmit agent

bool GrowDuringAntibioticsAttack(int agent_id, PlayerBase player)

DEPRECATED

References map.Get(), GrowDuringMedicalDrugsAttack(), and m_AgentList