61 {
62 int agentCount = player.m_AgentPool.GetSingleAgentCount(
eAgents.FOOD_POISON);
64 return;
65
66 int agentMax = PluginTransmissionAgents.GetAgentMaxCount(
eAgents.FOOD_POISON);
67
68 float invertedAgentCountValue = Math.InverseLerp(0, agentMax, agentCount);
70 chance = (chance / 300) * deltaT;
71
72 if (Math.RandomFloat01() < chance)
73 {
74
75 SymptomBase symptom = player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_VOMIT);
76 if (symptom)
77 {
78 DoOnce.Run(ClassName(), player, "IncreaseDiseaseCount");
79
80 CachedObjectsParams.PARAM1_FLOAT.param1 = 30.0 * invertedAgentCountValue;
81 symptom.
SetParam(CachedObjectsParams.PARAM1_FLOAT);
82 symptom.
SetDuration(Math.Max(3.0, 10 * invertedAgentCountValue));
83
84 player.m_AgentPool.ReduceAgent(
eAgents.FOOD_POISON, 60);
89
92
95 }
96 }
97
99 {
102 {
105
107 }
108 }
109 }
static const int VOMIT_OCCURRENCES_MIN
static const int WATER_DRAIN_FROM_VOMIT
static const int VOMIT_OCCURRENCES_MAX
static const int AGENT_THRESHOLD_DEACTIVATE
static const int ENERGY_DRAIN_FROM_VOMIT
void SetDuration(float duration)