Nutrition fix (#17785)

* Nutrition fix

* Update build.js

* Update build.js
This commit is contained in:
Cameron Lennox
2025-06-02 12:39:41 -07:00
committed by GitHub
parent febd8bf940
commit dd99e0951b
3 changed files with 29 additions and 16 deletions
@@ -1158,6 +1158,19 @@
return 0 //godmode
// nutrition decrease
// Species controls hunger rate for humans, otherwise use defaults
if(nutrition > 0 && stat != DEAD)
var/nutrition_reduction = DEFAULT_HUNGER_FACTOR
nutrition_reduction = species.hunger_factor
// Modifiers can increase or decrease nutrition cost
for(var/datum/modifier/mod in modifiers)
if(!isnull(mod.metabolism_percent))
nutrition_reduction *= mod.metabolism_percent
var/datum/component/nutrition_size_change/comp = GetComponent(/datum/component/nutrition_size_change)
if(comp)
nutrition_reduction *= comp.get_nutrition_multiplier()
adjust_nutrition(-nutrition_reduction)
if(noisy == TRUE && nutrition < 250 && prob(10))
var/sound/growlsound = sound(get_sfx("hunger_sounds"))
var/growlmultiplier = 100 - (nutrition / 250 * 100)