Skip to content

Commit

Permalink
[MIRROR] Fix Bluespace RPEDs not applying circuits at a distance when…
Browse files Browse the repository at this point in the history
… you have multiple options. (#1175)

* Fix Bluespace RPEDs not applying circuits at a distance when you have multiple options. (#81670)

## About The Pull Request

As per #81668, Bluespace RPEDs weren't applying circuits at a distance
if you had multiple options.
Looking into it, this seemed to be because the sanity checks after the
selection menu had been closed accounted for adjacency but not that the
replacer could work at a distance.
Adding a check for this fixed it.
I then decided splitting this off into its own if statement would be
best for our long-term sanity, given the first if was getting quite long
and the added parenthesis really would not help.
## Why It's Good For The Game

Fixes #81668.
## Changelog
:cl:
fix: Fixed Bluespace RPEDs failing to apply circuits from a distance if
you had to select between multiple.
/:cl:

* Fix Bluespace RPEDs not applying circuits at a distance when you have multiple options.

---------

Co-authored-by: _0Steven <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Feb 27, 2024
1 parent 958f76d commit 76066d3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion code/game/machinery/constructable_frame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,12 @@
else
var/option = tgui_input_list(user, "Select Circuitboard To Install"," Available Boards", circuit_boards)
target_board = circuit_boards[option]
if(QDELETED(target_board) || QDELETED(src) || QDELETED(user) || !(target_board in replacer) || !user.is_holding(replacer) || !user.Adjacent(src))
// Everything still where it should be after the UI closed?
if(QDELETED(target_board) || QDELETED(src) || QDELETED(user) || !(target_board in replacer) || !user.is_holding(replacer))
return FALSE
// User still within range?
var/close_enough = replacer.works_from_distance || user.Adjacent(src)
if(!close_enough)
return FALSE

if(install_board(user, target_board, by_hand = FALSE))
Expand Down

0 comments on commit 76066d3

Please sign in to comment.