From b4fa897ea12a58bffe3e0e8622d60f5ea3092b50 Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Tue, 25 Apr 2023 15:13:52 -0400 Subject: [PATCH] Teleporters now use crossed over bump (#20902) --- code/game/machinery/teleporter.dm | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index bfcad59d5b8..b083962dfce 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -329,6 +329,9 @@ name = "teleporter hub" desc = "It's the hub of a teleporting machine." icon_state = "tele0" + density = FALSE + layer = HOLOPAD_LAYER //Preventing mice and drones from sneaking under them. + plane = FLOOR_PLANE var/accurate = 0 idle_power_consumption = 10 active_power_consumption = 2000 @@ -377,13 +380,13 @@ break return power_station -/obj/machinery/teleport/hub/Bumped(M as mob|obj) +/obj/machinery/teleport/hub/Crossed(atom/movable/AM, oldloc) if(!is_teleport_allowed(z) && !admin_usage) - if(ismob(M)) - to_chat(M, "You can't use this here.") + if(ismob(AM)) + to_chat(AM, "You can't use this here.") return - if(power_station && power_station.engaged && !panel_open && !blockAI(M)) - if(!teleport(M) && isliving(M)) // the isliving(M) is needed to avoid triggering errors if a spark bumps the telehub + if(power_station && power_station.engaged && !panel_open && !blockAI(AM)) + if(!teleport(AM) && isliving(AM)) // the isliving(M) is needed to avoid triggering errors if a spark bumps the telehub visible_message("[src] emits a loud buzz, as its teleport portal flickers and fails!") playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, FALSE) power_station.toggle() // turn off the portal. @@ -448,6 +451,9 @@ name = "permanent teleporter" desc = "A teleporter with the target pre-set on the circuit board." icon_state = "tele0" + density = FALSE + layer = HOLOPAD_LAYER + plane = FLOOR_PLANE idle_power_consumption = 10 active_power_consumption = 2000 @@ -468,23 +474,23 @@ tele_delay = max(A, 0) update_icon(UPDATE_ICON_STATE) -/obj/machinery/teleport/perma/Bumped(atom/A) +/obj/machinery/teleport/perma/Crossed(atom/movable/AM, oldloc) if(stat & (BROKEN|NOPOWER)) return if(!is_teleport_allowed(z)) - to_chat(A, "You can't use this here.") + to_chat(AM, "You can't use this here.") return - if(target && !recalibrating && !panel_open && !blockAI(A)) - do_teleport(A, target) + if(target && !recalibrating && !panel_open && !blockAI(AM)) + do_teleport(AM, target) use_power(5000) if(tele_delay) recalibrating = TRUE update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS) update_lighting() - addtimer(CALLBACK(src, PROC_REF(BumpedCallback)), tele_delay) + addtimer(CALLBACK(src, PROC_REF(CrossedCallback)), tele_delay) -/obj/machinery/teleport/perma/proc/BumpedCallback() +/obj/machinery/teleport/perma/proc/CrossedCallback() recalibrating = FALSE update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS) update_lighting()