[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 <rohesie@gmail.com>
This commit is contained in:
SkyratBot
2020-09-09 08:31:19 +02:00
committed by GitHub
co-authored by Rohesie
parent 2920d1ce68
commit 88859bbeaf
2 changed files with 9 additions and 1 deletions
@@ -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
@@ -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