diff --git a/code/controllers/supply_shuttle.dm b/code/controllers/supply_shuttle.dm index 1457fa818bb..fd68fcac95f 100644 --- a/code/controllers/supply_shuttle.dm +++ b/code/controllers/supply_shuttle.dm @@ -171,24 +171,18 @@ var/global/datum/controller/supply_shuttle/supply_shuttle proc/send() var/area/from var/area/dest - var/area/the_shuttles_way switch(at_station) if(1) from = locate(SUPPLY_STATION_AREATYPE) dest = locate(SUPPLY_DOCK_AREATYPE) - the_shuttles_way = from at_station = 0 if(0) from = locate(SUPPLY_DOCK_AREATYPE) dest = locate(SUPPLY_STATION_AREATYPE) - the_shuttles_way = dest at_station = 1 + dest.clear_docking_area() moving = 0 - //Do I really need to explain this loop? - for(var/mob/living/unlucky_person in the_shuttles_way) - unlucky_person.gib() - from.move_contents_to(dest) //Check whether the shuttle is allowed to move diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 614c6009fbc..53b40c49921 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -297,4 +297,34 @@ // There's a gravity generator on our z level if(T && gravity_generators["[T.z]"] && length(gravity_generators["[T.z]"])) return 1 - return 0 \ No newline at end of file + return 0 + +/area/proc/clear_docking_area() + var/list/dstturfs = list() + var/throwy = world.maxy + + for(var/turf/T in src) + dstturfs += T + if(T.y < throwy) + throwy = T.y + + // hey you, get out of the way! + for(var/turf/T in dstturfs) + // find the turf to move things to + var/turf/D = locate(T.x, throwy - 1, T.z) + for(var/atom/movable/AM as mob|obj in T) + //mobs take damage + if(istype(AM, /mob/living)) + var/mob/living/living_mob = AM + living_mob.Paralyse(10) + living_mob.take_organ_damage(80) + //Anything not bolted down is moved, everything else is destroyed + if(!AM.anchored) + AM.Move(D) + else + qdel(AM) + if(istype(T, /turf/simulated)) + del(T) + + for(var/atom/movable/bug in src) // If someone (or something) is somehow still in the shuttle's docking area... + qdel(bug) \ No newline at end of file diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 27e5221f934..1002d63f30b 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -21,23 +21,7 @@ datum/shuttle_manager/proc/move_shuttle(var/override_delay) fromArea = locate(location) //the location of the shuttle toArea = locate(fromArea.destination) - var/list/dstturfs = list() - var/throwy = world.maxy - - for(var/turf/T in toArea) - dstturfs += T - if(T.y < throwy) - throwy = T.y - - // Destroy everything in the destination area - for(var/turf/T in dstturfs) - for(var/atom/movable/AM as mob|obj in T) - AM.ex_act(1) //splat - if(AM) - qdel(AM) - - if(istype(T, /turf/simulated)) - del(T) + toArea.clear_docking_area() fromArea.move_contents_to(toArea) location = toArea.type @@ -64,8 +48,6 @@ datum/shuttle_manager/proc/move_shuttle(var/override_delay) return 1 - - /obj/machinery/computer/shuttle name = "Shuttle Console" icon = 'icons/obj/computer.dmi'