Skip to content

Commit

Permalink
[MIRROR] Fixes sec computers having infinite distance (#1473) (#2439)
Browse files Browse the repository at this point in the history
* Fixes sec computers having infinite distance (#82016)

## About The Pull Request

Camera consoles no longer have infinite range, which was caused by the
``can_perform_action`` check causing an early return before
``try_update_ui`` could run and update your visibility on the console.

This has been a bug for a long time and I've constantly procrastinated
on fixing it but it was brought up when discussing Human AI bugs so I
went in to look around and found out what caused it, so I can finally
say I did it.

## Why It's Good For The Game

Security cameras no longer have infinite range.

## Changelog

:cl:
fix: Security camera consoles no longer have infinite range.
/:cl:

* Fixes sec computers having infinite distance

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: John Willard <[email protected]>
  • Loading branch information
3 people authored Mar 17, 2024
1 parent 37723cc commit 334fac5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/game/machinery/computer/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

/obj/machinery/computer/security/ui_interact(mob/user, datum/tgui/ui)
. = ..()
if(!user.can_perform_action(src, NEED_DEXTERITY|ALLOW_SILICON_REACH)) //prevents monkeys from using camera consoles
if(!user.client) //prevents errors by trying to pass clients that don't exist.
return
// Update UI
ui = SStgui.try_update_ui(user, src, ui)
Expand Down

0 comments on commit 334fac5

Please sign in to comment.