From 8cf2fdbadb03158e04083286fddcaf049ba7e49b Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Sat, 3 Feb 2024 00:32:16 -0500 Subject: [PATCH] [MIRROR] Fixes tram alt-click interactions (#754) * Fixes tram alt-click interactions (#81255) ## About The Pull Request A part of https://github.com/tgstation/tgstation/issues/81242 ## Why It's Good For The Game Don't interact with things you shouldn't be ## Changelog :cl: LT3 fix: Fixed alt-click validation for tram interactions /:cl: * Fixes tram alt-click interactions --------- Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com> --- code/modules/transport/tram/tram_remote.dm | 4 ++++ code/modules/transport/tram/tram_signals.dm | 3 +++ 2 files changed, 7 insertions(+) diff --git a/code/modules/transport/tram/tram_remote.dm b/code/modules/transport/tram/tram_remote.dm index 71433d56ddf..4176117d8b2 100644 --- a/code/modules/transport/tram/tram_remote.dm +++ b/code/modules/transport/tram/tram_remote.dm @@ -108,6 +108,10 @@ SEND_SIGNAL(src, COMSIG_TRANSPORT_REQUEST, specific_transport_id, destination, options) /obj/item/assembly/control/transport/remote/AltClick(mob/user) + . = ..() + if(!can_interact(user)) + return + link_tram(user) /obj/item/assembly/control/transport/remote/proc/link_tram(mob/user) diff --git a/code/modules/transport/tram/tram_signals.dm b/code/modules/transport/tram/tram_signals.dm index 904bb162c45..101ae1027a3 100644 --- a/code/modules/transport/tram/tram_signals.dm +++ b/code/modules/transport/tram/tram_signals.dm @@ -14,6 +14,7 @@ active_power_usage = BASE_MACHINE_ACTIVE_CONSUMPTION * 0.72 anchored = TRUE density = FALSE + interaction_flags_machine = INTERACT_MACHINE_OPEN circuit = /obj/item/circuitboard/machine/crossing_signal // pointless if it only takes 2 seconds to cross but updates every 2 seconds subsystem_type = /datum/controller/subsystem/processing/fastprocess @@ -171,6 +172,8 @@ /obj/machinery/transport/crossing_signal/AltClick(mob/living/user) . = ..() + if(!can_interact(user)) + return var/obj/item/tool = user.get_active_held_item() if(!panel_open || tool?.tool_behaviour != TOOL_WRENCH)