From 6de658bf0da2367b9b40062e55d349c38383d3ef Mon Sep 17 00:00:00 2001 From: Neerti Date: Thu, 28 Feb 2019 22:29:36 -0500 Subject: [PATCH 1/2] Merge pull request #5981 from Heroman3003/handtele-fix-fix Handtele no longer relies on teleporter being mapped in in very specific way --- code/game/objects/items/weapons/teleportation.dm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 3818ddac81e..39e164d49fa 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -138,7 +138,16 @@ Frequency: return var/list/L = list( ) for(var/obj/machinery/teleport/hub/R in machines) - var/obj/machinery/computer/teleporter/com = locate(/obj/machinery/computer/teleporter, locate(R.x - 2, R.y, R.z)) + var/obj/machinery/computer/teleporter/com + var/obj/machinery/teleport/station/station + for(var/direction in cardinal) + station = locate(/obj/machinery/teleport/station, get_step(R, direction)) + if(station) + for(direction in cardinal) + com = locate(/obj/machinery/computer/teleporter, get_step(station, direction)) + if(com) + break + break if (istype(com, /obj/machinery/computer/teleporter) && com.locked && !com.one_time_use) if(R.icon_state == "tele1") L["[com.id] (Active)"] = com.locked