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
This commit is contained in:
oranges
2016-12-20 14:42:08 +01:00
committed by AnturK
parent ba00d1ddf1
commit 122e9835f8
+3 -5
View File
@@ -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)