engine/calculators/source/AlcoholCalculator.cpp
// Grams of alcohol to absorb per tick.
Grams of alcohol to absorb per tick.
Grams of alcohol to absorb per tick .
float AlcoholCalculator::calculate_grams_to_absorb(CreaturePtr creature)
{
  float to_absorb = 0.0f;
  if (creature)
  {
    float remaining = creature->get_grams_unabsorbed_alcohol();
    float base_rate = absorption_by_sex.find(creature->get_sex())->second;
    to_absorb = base_rate;
    if (to_absorb > remaining)
    {
      to_absorb = remaining;
    }
  }
  return to_absorb;
}
float AlcoholCalculator :: calculate_grams_to_absorb ( CreaturePtr creature ) { float to_absorb = 0.0f ; if ( creature ) { float remaining = creature -> get_grams_unabsorbed_alcohol ( ) ; float base_rate = absorption_by_sex . find ( creature -> get_sex ( ) ) -> second ; to_absorb = base_rate ; if ( to_absorb > remaining ) { to_absorb = remaining ; } } return to_absorb ; }
Grams of alcohol to absorb per tick.
Grams of alcohol to absorb per tick .
// Additional calculations (weight, etc.) will affect this later.