diff --git a/code/modules/unit_tests/chain_pull_through_space.dm b/code/modules/unit_tests/chain_pull_through_space.dm index b59de2a4670..b718da91c2c 100644 --- a/code/modules/unit_tests/chain_pull_through_space.dm +++ b/code/modules/unit_tests/chain_pull_through_space.dm @@ -4,17 +4,22 @@ var/mob/living/carbon/human/alice var/mob/living/carbon/human/bob var/mob/living/carbon/human/charlie + var/targetz = 5 + var/datum/turf_reservation/reserved /datum/unit_test/chain_pull_through_space/New() ..() + //reserve a tile that is always empty for our z destination + reserved = SSmapping.RequestBlockReservation(5,5) + // Create a space tile that goes to another z-level claimed_tile = run_loc_floor_bottom_left.type space_tile = new(locate(run_loc_floor_bottom_left.x, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z)) - space_tile.destination_x = 100 - space_tile.destination_y = 100 - space_tile.destination_z = 5 + space_tile.destination_x = round(reserved.bottom_left_coords[1] + (reserved.width-1) / 2) + space_tile.destination_y = round(reserved.bottom_left_coords[2] + (reserved.height-1) / 2) + space_tile.destination_z = reserved.bottom_left_coords[3] // Create our list of humans, all adjacent to one another alice = new(locate(run_loc_floor_bottom_left.x + 2, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z)) @@ -31,6 +36,7 @@ qdel(alice) qdel(bob) qdel(charlie) + qdel(reserved) return ..() /datum/unit_test/chain_pull_through_space/Run()