From 122e9835f8b94162e48aa07be10fce201caafd7f Mon Sep 17 00:00:00 2001 From: oranges Date: Wed, 21 Dec 2016 02:42:08 +1300 Subject: [PATCH] Tweak drop contents proc (#22310) The . += syntax wasn't valid, since . started out as null, not a list, causing a runtime, more importantly, nothing used the return value, so I've refactored it to be a bit cleaner and not use two loops --- code/game/machinery/machinery.dm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 3372133f1c8..3306523267a 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -169,13 +169,11 @@ Class Procs: /obj/machinery/proc/dropContents() var/turf/T = get_turf(src) - for(var/mob/living/L in src) - L.forceMove(T) - L.update_canmove() //so the mob falls if he became unconscious inside the machine. - . += L - for(var/atom/movable/A in contents) A.forceMove(T) + if(isliving(A)) + var/mob/living/L = A + L.update_canmove() occupant = null /obj/machinery/proc/close_machine(mob/living/target = null)