SecurEye now properly follows moving cameras (#89507)

## About The Pull Request

Port of a fix from
https://github.com/Monkestation/Monkestation2.0/pull/4995

Due to how modular computers worked with the nested tgui stuff, the
SecurEye app wouldn't properly autoupdate whenever a camera it was
watching moved (when there's not any tracking going on)

This "fixes" that issue by adding a new var, `always_update_ui`, to
modular computer programs, which will make the modpc call the active
program's `ui_interact` even after the UI is opened.

## Why It's Good For The Game

bugfix good. if the whole "watch broadcast camera streams on PDA" thing
ever gets ported here, this is a needed fix for that.

## Changelog
🆑
fix: SecurEye now properly follows moving cameras.
/🆑
This commit is contained in:
Lucy
2025-02-17 10:54:45 +00:00
committed by GitHub
parent a1cb623670
commit 803589da07
3 changed files with 7 additions and 4 deletions
@@ -46,14 +46,12 @@
// Operates TGUI
/obj/item/modular_computer/ui_interact(mob/user, datum/tgui/ui)
if(!enabled || !user.can_read(src, READING_CHECK_LITERACY))
if(ui)
ui.close()
ui?.close()
return
// Robots don't really need to see the screen, their wireless connection works as long as computer is on.
if(!screen_on && !issilicon(user))
if(ui)
ui.close()
ui?.close()
return
if(honkvirus_amount > 0) // EXTRA annoying, huh!
@@ -63,6 +61,8 @@
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
update_tablet_open_uis(user)
else if(active_program?.always_update_ui)
active_program.ui_interact(user, ui)
/obj/item/modular_computer/ui_assets(mob/user)
var/list/data = list()