From d561774a317282c06daaea08f7fd4a7fb1e067f7 Mon Sep 17 00:00:00 2001 From: harryob <55142896+harryob@users.noreply.github.com> Date: Wed, 30 Aug 2023 23:47:30 +0100 Subject: [PATCH] turning in your stomach and making you feel sick --- .../mob/living/carbon/human/update_icons.dm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index a1e827f26cf6..92291daa38f4 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -76,16 +76,20 @@ There are several things that need to be remembered: /mob/living/carbon/human/apply_overlay(cache_index) - var/list/images = overlays_standing[cache_index] + var/image/images = overlays_standing[cache_index] - if(!islist(images)) - images = list(images) + if(!images) + return - if(length(images)) - for(var/image/current_image as anything in images) + if(islist(images)) + var/list/overlays = images + for(var/image/current_image as anything in overlays) current_image.appearance_flags |= RESET_COLOR - SEND_SIGNAL(src, COMSIG_HUMAN_OVERLAY_APPLIED, cache_index, images) - overlays += images + else + images.appearance_flags |= RESET_COLOR + + SEND_SIGNAL(src, COMSIG_HUMAN_OVERLAY_APPLIED, cache_index, images) + overlays += images /mob/living/carbon/human/remove_overlay(cache_index) if(overlays_standing[cache_index])