Renames vars on pdas and removes ntnet_relays glob (#79595)

## About The Pull Request

- replaces the ntnet_relays global list with ``get_machines_by_type``
- renames ``transfer_access`` var on PDA to ``download_access`` &
``required_access`` to ``run_access`` to better describe what they do,
because on more than one ocassion I've confused myself with the two
terms and ended up doing something unintentional (see:
https://github.com/tgstation/tgstation/pull/74269)

## Why It's Good For The Game

Kills a useless global list and makes pda code a little less confusing.

## Changelog

Nothing player-facing.
This commit is contained in:
John Willard
2023-11-12 19:35:58 -05:00
committed by GitHub
parent 67ad491337
commit 78f04be9f8
21 changed files with 66 additions and 73 deletions
@@ -6,7 +6,7 @@
extended_desc = "This program monitors stationwide NTNet network, provides access to logging systems, and allows for configuration changes"
size = 12
requires_ntnet = TRUE
required_access = list(ACCESS_NETWORK) //NETWORK CONTROL IS A MORE SECURE PROGRAM.
run_access = list(ACCESS_NETWORK) //NETWORK CONTROL IS A MORE SECURE PROGRAM.
available_on_ntnet = TRUE
tgui_id = "NtosNetMonitor"
program_icon = "network-wired"
@@ -20,7 +20,7 @@
SSmodular_computers.intrusion_detection_enabled = !SSmodular_computers.intrusion_detection_enabled
return TRUE
if("toggle_relay")
var/obj/machinery/ntnet_relay/target_relay = locate(params["ref"]) in GLOB.ntnet_relays
var/obj/machinery/ntnet_relay/target_relay = locate(params["ref"]) in SSmachines.get_machines_by_type(/obj/machinery/ntnet_relay)
if(!istype(target_relay))
return
target_relay.set_relay_enabled(!target_relay.relay_enabled)
@@ -39,7 +39,7 @@
var/list/data = list()
data["ntnetrelays"] = list()
for(var/obj/machinery/ntnet_relay/relays as anything in GLOB.ntnet_relays)
for(var/obj/machinery/ntnet_relay/relays as anything in SSmachines.get_machines_by_type(/obj/machinery/ntnet_relay))
var/list/relay_data = list()
relay_data["is_operational"] = !!relays.is_operational
relay_data["name"] = relays.name