295 {
297
300 if (stomachItemsCount == 0)
301 return;
302
303 float digestionPointsPerItem = (
DIGESTION_POINTS / stomachItemsCount) * delta_time;
305 for (int i = stomachItemsCount - 1; i >= 0; i--)
306 {
308 float water, energy, toxicity, volume, consumedAmount;
309 int agents;
310
311 if (item.
ProcessDigestion(digestionPointsPerItem, water, energy, toxicity, volume, agents, consumedAmount))
312 {
315 }
316
318 m_Player.GetStatEnergy().Add(energy);
320
321 if (energy > 0)
323
324 if (water > 0)
326
329 if (amountOfAgents == 0)
330 amountOfAgents = consumedAmount;
331
335
337 }
338 }
void UpdateStomachTemperature()
const float DIGESTION_POINTS
class StomachItem DIGESTING_WATER
void DigestAgents(int agents, float quantity)
const int DIGESTING_ENERGY
ref array< ref StomachItem > m_StomachContents
static const float BLOODY_HANDS_FOOD_POISON_AGENT_INCREMENT
ref NutritionalProfile m_Profile
bool ProcessDigestion(float digestion_points, out float water, out float energy, out float toxicity, out float volume, out int agents, out float consumed_amount)
static proto float Max(float x, float y)
Returns bigger of two given values.