Added a cap, NUTRIENT_LEVEL_ALMOST_FULL (535), for mobs that continually gain nutrient (#40572)

Added a cap, NUTRIENT_LEVEL_ALMOST_FULL (535), for mobs that continually gain nutrient. They climb towards this value so that they don't get the "im so fat" debuff as soon as they reach the normal cap, which is 550.
This commit is contained in:
MrDoomBringer
2018-09-29 23:01:17 -04:00
committed by Emmett Gaines
parent 86729382f6
commit 73d9d26c12
3 changed files with 7 additions and 4 deletions
@@ -293,8 +293,8 @@
var/turf/T = H.loc
light_amount = min(1,T.get_lumcount()) - 0.5
H.nutrition += light_amount * 10
if(H.nutrition > NUTRITION_LEVEL_FULL)
H.nutrition = NUTRITION_LEVEL_FULL
if(H.nutrition > NUTRITION_LEVEL_ALMOST_FULL)
H.nutrition = NUTRITION_LEVEL_ALMOST_FULL
if(light_amount > 0.2) //if there's enough light, heal
H.heal_overall_damage(1,1)
H.adjustToxLoss(-1)
@@ -31,8 +31,8 @@
var/turf/T = H.loc
light_amount = min(1,T.get_lumcount()) - 0.5
H.nutrition += light_amount * 10
if(H.nutrition > NUTRITION_LEVEL_FULL)
H.nutrition = NUTRITION_LEVEL_FULL
if(H.nutrition > NUTRITION_LEVEL_ALMOST_FULL)
H.nutrition = NUTRITION_LEVEL_ALMOST_FULL
if(light_amount > 0.2) //if there's enough light, heal
H.heal_overall_damage(1,1)
H.adjustToxLoss(-1)