From 08142878aa5a796c49ea97c96ff28aa8173638e7 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Wed, 2 Oct 2024 16:06:38 -0500 Subject: [PATCH] if cats not glowing --- code/modules/mob/living/simple_animal/friendly/cat.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index e8a7f981071b..2d77fb7c89a8 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -44,6 +44,7 @@ var/current_tick_amount = 0 var/last_tick_amount = 0 var/fail_to_receive = 0 + var/glow_strength /mob/living/simple_animal/pet/cat/Initialize() . = ..() @@ -190,8 +191,7 @@ update_glow() /mob/living/simple_animal/pet/cat/proc/update_glow() - var/glow_strength = 0 - remove_filter("ray_cat_glow") + var/old_glow_strength = glow_strength switch(radiation_count) if(-INFINITY to RAD_LEVEL_NORMAL) glow_strength = 1 @@ -205,7 +205,10 @@ glow_strength = 5 if(RAD_LEVEL_CRITICAL to INFINITY) glow_strength = 6 - add_filter("ray_cat_glow", 2, drop_shadow_filter(x = 0, y = -1, size = glow_strength, color = RAD_GLOW_COLOR)) + if((old_glow_strength != glow_strength) && (glow_strength > 1)) + src.add_filter("ray_cat_glow", 2, list("type" = "outline", "color" = RAD_GLOW_COLOR, "size" = glow_strength)) + if(glow_strength <= 1) + src.remove_filter("ray_cat_glow") /mob/living/simple_animal/pet/cat/Life() radiation_count -= radiation_count/RAD_MEASURE_SMOOTHING