From 876c163897c188c8b40a9799200bc35b577cbf5a Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Fri, 2 Oct 2020 22:35:10 +0200 Subject: [PATCH] Stops dionas from getting nutrients from light as vampire --- .../mob/living/carbon/human/species/diona.dm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/diona.dm b/code/modules/mob/living/carbon/human/species/diona.dm index 2ce011c7159..133a334a998 100644 --- a/code/modules/mob/living/carbon/human/species/diona.dm +++ b/code/modules/mob/living/carbon/human/species/diona.dm @@ -85,9 +85,8 @@ return ..() /datum/species/diona/handle_life(mob/living/carbon/human/H) - if(H.stat == DEAD) - return var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing + var/is_vamp = H.mind?.vampire != null if(isturf(H.loc)) //else, there's considered to be no light var/turf/T = H.loc light_amount = min(1, T.get_lumcount()) - 0.5 @@ -95,9 +94,12 @@ H.clear_alert("nolight") else H.throw_alert("nolight", /obj/screen/alert/nolight) - H.adjust_nutrition(light_amount * 10) - if(H.nutrition > NUTRITION_LEVEL_ALMOST_FULL) - H.set_nutrition(NUTRITION_LEVEL_ALMOST_FULL) + + if(!is_vamp) + H.adjust_nutrition(light_amount * 10) + if(H.nutrition > NUTRITION_LEVEL_ALMOST_FULL) + H.set_nutrition(NUTRITION_LEVEL_ALMOST_FULL) + if(light_amount > 0.2 && !H.suiciding) //if there's enough light, heal if(!pod && H.health <= 0) return @@ -106,7 +108,7 @@ H.adjustToxLoss(-1) H.adjustOxyLoss(-1) - if(H.nutrition < NUTRITION_LEVEL_STARVING + 50) + if(!is_vamp && H.nutrition < NUTRITION_LEVEL_STARVING + 50) H.adjustBruteLoss(2) ..()