mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-31 07:58:22 +01:00
Nutrition fix (#17785)
* Nutrition fix * Update build.js * Update build.js
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user