Fix chain pull through space issue (fixes unit test failure) (#69832)

This commit is contained in:
Marina
2022-09-18 11:56:02 -07:00
committed by GitHub
parent 4c18ed1c8b
commit 0edff40493
@@ -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()