From 73d9d26c120ef972a508eaeab0e951641e60c7dc Mon Sep 17 00:00:00 2001 From: MrDoomBringer Date: Sat, 29 Sep 2018 23:01:17 -0400 Subject: [PATCH] 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. --- code/__DEFINES/mobs.dm | 3 +++ code/modules/mob/living/carbon/human/species_types/golems.dm | 4 ++-- .../mob/living/carbon/human/species_types/podpeople.dm | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index fc9f66cbb88..943bea2cf1a 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -156,6 +156,9 @@ #define DISGUST_LEVEL_VERYGROSS 50 #define DISGUST_LEVEL_GROSS 25 +//Used as an upper limit for species that continuously gain nutriment +#define NUTRITION_LEVEL_ALMOST_FULL 535 + //Slime evolution threshold. Controls how fast slimes can split/grow #define SLIME_EVOLUTION_THRESHOLD 10 diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm index afc3fa2d042..84ad9d7e5ce 100644 --- a/code/modules/mob/living/carbon/human/species_types/golems.dm +++ b/code/modules/mob/living/carbon/human/species_types/golems.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm index 09b76575060..b0633f86f82 100644 --- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm @@ -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)