From 88859bbeaf79bbb2200a77b8d4071e877a832274 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 9 Sep 2020 08:31:19 +0200 Subject: [PATCH] [MIRROR] Pods eject things without a client on arrival (#720) * Pods eject things without a client on arrival (#53386) * pod * unconscious check * Pods eject things without a client on arrival Co-authored-by: Rohesie --- code/game/objects/structures/transit_tubes/station.dm | 8 ++++++++ .../objects/structures/transit_tubes/transit_tube_pod.dm | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm index bc44fb36226..0df80adcbce 100644 --- a/code/game/objects/structures/transit_tubes/station.dm +++ b/code/game/objects/structures/transit_tubes/station.dm @@ -115,6 +115,14 @@ if(STATION_TUBE_OPENING) icon_state = "open_[base_icon]" open_status = STATION_TUBE_OPEN + for(var/obj/structure/transit_tube_pod/pod in loc) + for(var/thing in pod) + if(ismob(thing)) + var/mob/mob_content = thing + if(mob_content.client && mob_content.stat < UNCONSCIOUS) + continue // Let the mobs with clients decide what they want to do themselves. + var/atom/movable/movable_content = thing + movable_content.forceMove(loc) //Everything else is moved out of. if(STATION_TUBE_CLOSING) icon_state = "closed_[base_icon]" open_status = STATION_TUBE_CLOSED diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index 961a37948b1..6987dd5c1f2 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -146,7 +146,7 @@ forceMove(next_loc) // When moving from one tube to another, skip collision and such. density = current_tube.density - if(current_tube && current_tube.should_stop_pod(src, next_dir)) + if(current_tube?.should_stop_pod(src, next_dir)) current_tube.pod_stopped(src, dir) break