From 0c0c60c4dee0fe79ba2aea741d30532d4de8a9e3 Mon Sep 17 00:00:00 2001 From: Heroman Date: Fri, 11 Nov 2022 16:12:09 +1000 Subject: [PATCH] Fixes prommie glow --- code/modules/mob/living/carbon/human/life.dm | 2 ++ code/modules/mob/living/life.dm | 3 +++ code/modules/mob/living/living_defines.dm | 5 +++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index b70c9989465..bd7bc878e00 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -291,11 +291,13 @@ var/obj/item/organ/internal/I = null //Used for further down below when an organ is picked. if(!radiation) if(species.appearance_flags & RADIATION_GLOWS) + glow_override = FALSE set_light(0) if(accumulated_rads) accumulated_rads -= RADIATION_SPEED_COEFFICIENT //Accumulated rads slowly dissipate very slowly. Get to medical to get it treated! else if(((life_tick % 5 == 0) && radiation) || (radiation > 600)) //Radiation is a slow, insidious killer. Unless you get a massive dose, then the onset is sudden! if(species.appearance_flags & RADIATION_GLOWS) + glow_override = TRUE set_light(max(1,min(5,radiation/15)), max(1,min(10,radiation/25)), species.get_flesh_colour(src)) // END DOGSHIT SNOWFLAKE diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 6356bfb7b34..eb7462967e1 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -238,6 +238,9 @@ return /mob/living/proc/handle_light() + if(glow_override) + return FALSE + if(instability >= TECHNOMANCER_INSTABILITY_MIN_GLOW) var/distance = round(sqrt(instability / 2)) if(distance) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index c5e7a857b84..031d6ddb89a 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -55,7 +55,8 @@ var/image/dsoverlay = null //Overlay used for darksight eye adjustments - var/glow_toggle = 0 // If they're glowing! + var/glow_toggle = FALSE // If they're glowing! + var/glow_override = FALSE // Ignore the manual toggle var/glow_range = 2 var/glow_intensity = null var/glow_color = "#FFFFFF" // The color they're glowing! @@ -80,4 +81,4 @@ var/flying = 0 // Allows flight var/inventory_panel_type = /datum/inventory_panel var/datum/inventory_panel/inventory_panel - var/last_resist_time = 0 // world.time of the most recent resist that wasn't on cooldown. + var/last_resist_time = 0 // world.time of the most recent resist that wasn't on cooldown.