Fixes Camera Monitoring Console UI restricted network access (#21758)

Fixes https://github.com/Aurorastation/Aurora.3/issues/21757.

Changes made in https://github.com/Aurorastation/Aurora.3/pull/21734
allowed for camera monitoring consoles to launch their own headless
versions of the Camera Monitoring app, but the Horizon's mapped
consoles, unlike Runtime's, have some dedicated network restrictions.

This PR adds a var to the camera_monitor program that can hold the src
of the UI, which in the case of camera monitoring consoles, will
restrict the available networks displayed to those set on the console
obj itself.

changes:
- bugfix: "Dedicated camera monitoring console UIs now display only that
console's predefined networks, not all networks to which the user has
access (as is the case with regular use of the camera monitoring app.)"
- bugfix: "Removes an unnecessary process() func from camera monitoring
consoles."
This commit is contained in:
Batrachophreno
2026-01-30 19:27:26 +00:00
committed by GitHub
parent f797eb05c0
commit b64cb2a1c6
3 changed files with 81 additions and 7 deletions
+9 -5
View File
@@ -22,7 +22,16 @@
if(console_networks.len)
current_network = console_networks[1]
// Create a new camera_monitor program that can run independently of a modular computer.
camera_monitor_program = new("Compless")
// Make sure that camera_monitor knows its been generated from a dedicated console; this will define its network access.
camera_monitor_program.monitored_networks = console_networks
/obj/machinery/computer/security/Destroy()
if(camera_monitor_program)
camera_monitor_program = null
. = ..()
/obj/machinery/computer/security/attack_ai(var/mob/user as mob)
if(!ai_can_interact(user))
@@ -178,11 +187,6 @@
if(can_access_camera(jump_to))
switch_to_camera(user,jump_to)
/obj/machinery/computer/security/process()
if(cache_id != GLOB.camera_repository.camera_cache_id)
cache_id = GLOB.camera_repository.camera_cache_id
SSnanoui.update_uis(src)
/obj/machinery/computer/security/proc/can_access_camera(var/obj/machinery/camera/C)
var/list/shared_networks = src.console_networks & C.network
if(shared_networks.len)