Skip to content

Commit

Permalink
[MIRROR] Fixes tram alt-click interactions (#754)
Browse files Browse the repository at this point in the history
* Fixes tram alt-click interactions (#81255)

## About The Pull Request

A part of tgstation/tgstation#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>
  • Loading branch information
NovaBot13 and lessthnthree committed Feb 3, 2024
1 parent b58074b commit c87316a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/modules/transport/tram/tram_remote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/transport/tram/tram_signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c87316a

Please sign in to comment.