diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm index be7f94b3335..56227630894 100644 --- a/code/modules/shuttle/navigation_computer.dm +++ b/code/modules/shuttle/navigation_computer.dm @@ -36,6 +36,14 @@ . = ..() GLOB.navigation_computers -= src + if(my_port && my_port.get_docked()) + my_port.delete_after = TRUE + my_port.id = null + my_port.name = "Old [my_port.name]" + my_port = null + else + QDEL_NULL(my_port) + /obj/machinery/computer/camera_advanced/shuttle_docker/attack_hand(mob/user) if(jammed) to_chat(user, "The Syndicate is jamming the console!") @@ -227,9 +235,9 @@ // Too close to the map edge is never allowed if(!T || T.x <= 10 || T.y <= 10 || T.x >= world.maxx - 10 || T.y >= world.maxy - 10) return SHUTTLE_DOCKER_BLOCKED - /* // If it's one of our shuttle areas assume it's ok to be there + // If it's one of our shuttle areas assume it's ok to be there if(shuttle_port.shuttle_areas[T.loc]) - return SHUTTLE_DOCKER_LANDING_CLEAR */ + return SHUTTLE_DOCKER_LANDING_CLEAR . = SHUTTLE_DOCKER_LANDING_CLEAR // See if the turf is hidden from us var/list/hidden_turf_info diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index 924f9fd3e23..a55c153ab82 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -371,10 +371,24 @@ All ShuttleMove procs go here if(moving_dock == src) . |= MOVE_CONTENTS -/obj/docking_port/stationary/onShuttleMove(turf/newT, turf/oldT, list/movement_force, move_dir, obj/docking_port/stationary/old_dock, obj/docking_port/mobile/moving_dock) +// Never move the stationary docking port, otherwise things get WEIRD +/obj/docking_port/stationary/onShuttleMove() + return FALSE + +// Special movable stationary port, for your mothership shenanigans +/obj/docking_port/stationary/movable/onShuttleMove(turf/newT, turf/oldT, list/movement_force, move_dir, obj/docking_port/stationary/old_dock, obj/docking_port/mobile/moving_dock) if(!moving_dock.can_move_docking_ports || old_dock == src) return FALSE - . = ..() + + if(newT == oldT) // In case of in place shuttle rotation shenanigans. + return + + if(loc != oldT) // This is for multi tile objects + return + + loc = newT + + return TRUE /obj/docking_port/stationary/public_mining_dock/onShuttleMove(turf/newT, turf/oldT, list/movement_force, move_dir, obj/docking_port/stationary/old_dock, obj/docking_port/mobile/moving_dock) id = "mining_public" //It will not move with the base, but will become enabled as a docking point.