DIFF

class PlayerAgentPoolSource

Keeps track of agents and their simulation - adding/reducing of agents - autoinfection - temporary resistance for agents - reaction on drugs

Constructors 1

void PlayerAgentPool(PlayerBase player)
References m_AgentTemporaryResistance, m_LastTicked, m_Player
Show 1 more, m_VirusPool
Referenced by PlayerBase.Init()

Constants 1

const int STORAGE_VERSION = 137
Referenced by GetStorageVersion()

Members 8

int m_AgentMask
float m_LastTicked
Referenced by PlayerAgentPool()
float m_TotalAgentCount
Referenced by GrowAgents()
protected ref map<int, float> m_AgentTemporaryResistance
PluginTransmissionAgents m_PluginTransmissionAgents = PluginTransmissionAgents.Cast(GetPlugin(PluginTransmissionAgents))
ref array<int> m_VirusPoolArray = new array<int>()

DEPRECATED

Methods 25

int GetStorageVersion()
References STORAGE_VERSION
void ImmuneSystemTick(float value, float deltaT)

Agent pool simulation entry point

value
Immunity value (deprecated, used in previous versions)
deltaT
tick
protected void ProcessTemporaryResistance(float deltaTime)

Temporary resistance simulation

Referenced by ImmuneSystemTick()
void DigestAgent(int agent_id, float count)

Digest (add) agent from food/drink in PlayerStomach into Agent Pool

agent_id
Id of agent (see eAgents enum)
count
Amount of agents to add
void RemoveAgent(int agent_id)

Remove agent from Agent Pool

agent_id
Id of agent (see eAgents enum)
References SetAgentCount()
void RemoveAllAgents()

Remove all agents from Agent Pool

agent_id
Id of agent (see eAgents enum)
void ReduceAgent(int id, float percent)

Reduce count of specified agent by a given percentage from Agent Pool

agent_id
Id of agent (see eAgents enum)
percent
How many percents of the agents should be reduced
int GetAgents()

Reduce bitmask of currently active agents

References m_AgentMask
int GetSingleAgentCount(int agent_id)

Number of agents of specified id

agent_id
Id of agent to add into pool (see eAgents)

Returns: Count of agents specified in param

float GetTotalAgentCount()

Total number of agents active

Returns: Agents count

void SpawnAgents(float deltaT)

Autoinfection mechanism for agents with that attribute enabled

deltaT
tick
Referenced by ImmuneSystemTick()
void SetAgentCount(int agent_id, float count)

Directly set the count of agents for give id in pool

agent_id
Id of agent to add into pool (see eAgents)
count
Number of agents to be set
void AntibioticsAttack(float attack_value)

Antibiotics treatment agains agents which are not resistent to it (see agent attributes)

attack_value
Strength of the anitibiotics attack
void DrugsAttack(EMedicalDrugsType drugType, float attackValue)

Drugs attack calculation

drugType
Type of drug used (see EMedicalDrugsType enum)
attackValue
Strength of the drug attack
void SetTemporaryResistance(int agentId, float time)

Sets temporary resistance time against specified agent contraction

@param agent_id Id of agent to add into pool (see eAgents)
time
Length of resistance in seconds
float GetTemporaryResistance(int agentId)

Returns remaining temporary resistance time for specified agent

@param agent_id Id of agent to add into pool (see eAgents)

Returns: time in seconds

private void ResetTemporaryResistance()

Resets temporary resistance for all agents (internal usage only)

Referenced by RemoveAllAgents()
void PrintAgents()
References map.Count(), map.GetElement(), map.GetKey()
Show 4 more, Debug.Log(), ToString(), ToString(), and m_VirusPool