From 8e050332d60e0a3e60f8a8bfccc5fdd038e2394b Mon Sep 17 00:00:00 2001 From: ChuckTheSheep Date: Wed, 8 Jan 2014 18:12:17 -0500 Subject: [PATCH] Cleans up the for() and list handling in update. --- code/game/objects/structures/morgue.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index bbb86019d1a..178f9788582 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -33,14 +33,18 @@ src.icon_state = "morgue2"//default dead no-client mob - var/compiled = recursive_mob_check(src)//run through contents + var/list/compiled = recursive_mob_check(src)//run through contents - if(!locate(/mob/living/) in compiled)//no mobs at all, but objects inside + if(!length(compiled))//no mobs at all, but objects inside src.icon_state = "morgue3" + return for(var/mob/living/M in compiled) if(M.client) src.icon_state = "morgue4"//clone that mofo + break + + return