mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-12 08:27:13 +01:00
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:
@@ -44,6 +44,8 @@
|
||||
tgui_id = "CameraMonitoring"
|
||||
var/obj/machinery/camera/current_camera
|
||||
var/current_network
|
||||
/// Used for camera monitor consoles from which this interface can be launched. If it exists, only provide that console's "console_networks" networks.
|
||||
var/list/monitored_networks = list()
|
||||
|
||||
/datum/computer_file/program/camera_monitor/ui_data(mob/user)
|
||||
var/list/data = initial_data()
|
||||
@@ -52,7 +54,17 @@
|
||||
data["current_network"] = current_network
|
||||
|
||||
var/list/all_networks = list()
|
||||
for(var/network in SSatlas.current_map.station_networks)
|
||||
var/list/available_networks = list()
|
||||
|
||||
// If this UI was generated from a camera monitoring console, then only that console's networks will be available...
|
||||
if(monitored_networks && (length(monitored_networks) >= 1))
|
||||
available_networks = monitored_networks
|
||||
|
||||
// ...otherwise (if it was launched from a standard modular computer), get all networks to which the user has access.
|
||||
else
|
||||
available_networks = SSatlas.current_map.station_networks
|
||||
|
||||
for(var/network in available_networks)
|
||||
all_networks += list(
|
||||
list(
|
||||
"tag" = network,
|
||||
@@ -205,7 +217,6 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
// ERT Variant of the program
|
||||
/datum/computer_file/program/camera_monitor/ert
|
||||
filename = "ntcammon"
|
||||
|
||||
Reference in New Issue
Block a user