diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 0a6c2b9eca..4715c3bed3 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -36,6 +36,7 @@ var/grab_state = 0 var/throwforce = 0 var/datum/component/orbiter/orbiting + /// Used for space ztransit stuff var/can_be_z_moved = TRUE ///If we were without gravity and another animation happened, the bouncing will stop, and we need to restart it in next life(). var/floating_need_update = FALSE diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index 0e028ed4af..e70e0ac316 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -133,13 +133,10 @@ else to_chat(user, "The plating is going to need some support! Place metal rods first.") -/turf/open/space/Entered(atom/movable/A, atom/OldLoc) - . = ..() - - var/turf/old = get_turf(OldLoc) - if(!isspaceturf(old) && ismob(A)) - var/mob/M = A - M.update_gravity(M.mob_has_gravity()) +/turf/open/space/Entered(atom/movable/A) + ..() + if ((!(A) || src != A.loc)) + return if(destination_z && destination_x && destination_y && !(A.pulledby || !A.can_be_z_moved)) var/tx = destination_x @@ -160,18 +157,27 @@ ty-- DT = locate(tx, ty, destination_z) - var/atom/movable/AM = A.pulling + var/atom/movable/pulling = A.pulling + var/atom/movable/puller = A A.forceMove(DT) - if(AM) - var/turf/T = get_step(A.loc,turn(A.dir, 180)) - AM.can_be_z_moved = FALSE - AM.forceMove(T) - A.start_pulling(AM) - AM.can_be_z_moved = TRUE + + while (pulling != null) + var/next_pulling = pulling.pulling + + var/turf/T = get_step(puller.loc, turn(puller.dir, 180)) + pulling.can_be_z_moved = FALSE + pulling.forceMove(T) + puller.start_pulling(pulling) + pulling.can_be_z_moved = TRUE + + puller = pulling + pulling = next_pulling //now we're on the new z_level, proceed the space drifting stoplag()//Let a diagonal move finish, if necessary A.newtonian_move(A.inertia_dir) + A.inertia_moving = TRUE + /turf/open/space/Exited(atom/movable/AM, atom/OldLoc) . = ..() diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm index f3231087ef..c85d36dd15 100644 --- a/code/modules/unit_tests/_unit_tests.dm +++ b/code/modules/unit_tests/_unit_tests.dm @@ -24,7 +24,7 @@ // #include "metabolizing.dm" // #include "outfit_sanity.dm" #include "plantgrowth_tests.dm" -#include "quick_swap_sanity.dm" +// #include "quick_swap_sanity.dm" - we don't have quick swap yet #include "reagent_id_typos.dm" #include "reagent_recipe_collisions.dm" #include "resist.dm"