From 9ccc5174fbe4f9452ef6caa501877760b9eb942e Mon Sep 17 00:00:00 2001 From: Casey Date: Sun, 13 Nov 2022 15:47:19 -0500 Subject: [PATCH 1/2] Merge pull request #14065 from Heroman3003/prom-glow-fix 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 3cf501456b..bbd12e5e97 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 6356bfb7b3..eb7462967e 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 c5e7a857b8..031d6ddb89 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.