mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-29 14:37:11 +01:00
using map global variable
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
var/datum/nano_module/camera_monitor/hacked/HNM = NM
|
||||
|
||||
// The program is active and connected to one of the station's networks. Has a very small chance to trigger IDS alarm every tick.
|
||||
if(HNM && HNM.current_network && (HNM.current_network in using_map.station_networks) && prob(0.1))
|
||||
if(HNM && HNM.current_network && (HNM.current_network in GLOB.using_map.station_networks) && prob(0.1))
|
||||
if(ntnet_global.intrusion_detection_enabled)
|
||||
ntnet_global.add_log("IDS WARNING - Unauthorised access detected to camera network [HNM.current_network] by device with NID [computer.network_card.get_network_tag()]")
|
||||
ntnet_global.intrusion_detection_alarm = 1
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
"y" = alarm.y,
|
||||
"z" = alarm.z)
|
||||
data["alarms"] = alarms
|
||||
data["map_levels"] = using_map.get_map_levels(T.z)
|
||||
data["map_levels"] = GLOB.using_map.get_map_levels(T.z)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
data["all_sensors"] = sensors
|
||||
if(focus)
|
||||
data["focus"] = focus.return_reading_data()
|
||||
data["map_levels"] = using_map.get_map_levels(T.z)
|
||||
data["map_levels"] = GLOB.using_map.get_map_levels(T.z)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
@@ -90,7 +90,7 @@
|
||||
if(!T) // Safety check
|
||||
return
|
||||
if(T)
|
||||
levels += using_map.get_map_levels(T.z, FALSE)
|
||||
levels += GLOB.using_map.get_map_levels(T.z, FALSE)
|
||||
for(var/obj/machinery/power/sensor/S in machines)
|
||||
if(T && (S.loc.z == T.z) || (S.loc.z in levels) || (S.long_range)) // Consoles have range on their Z-Level. Sensors with long_range var will work between Z levels.
|
||||
if(S.name_tag == "#UNKN#") // Default name. Shouldn't happen!
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@
|
||||
var/turf/T = get_turf(nano_host())
|
||||
if(!T)
|
||||
return
|
||||
var/valid_z_levels = (GetConnectedZlevels(T.z) & using_map.station_levels)
|
||||
var/valid_z_levels = (GetConnectedZlevels(T.z) & GLOB.using_map.station_levels)
|
||||
for(var/obj/machinery/power/supermatter/S in machines)
|
||||
// Delaminating, not within coverage, not on a tile.
|
||||
if(S.grav_pulling || S.exploded || !(S.z in valid_z_levels) || !istype(S.loc, /turf/))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/proc/get_camera_access(var/network)
|
||||
if(!network)
|
||||
return 0
|
||||
. = using_map.get_network_access(network)
|
||||
. = GLOB.using_map.get_network_access(network)
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
if(NETWORK_ERT)
|
||||
return access_cent_specops
|
||||
|
||||
if(network in using_map.station_networks)
|
||||
if(network in GLOB.using_map.station_networks)
|
||||
return access_security // Default for all other station networks
|
||||
else
|
||||
return 999 //Inaccessible if not a station network and not mentioned above
|
||||
@@ -45,13 +45,13 @@
|
||||
data["current_network"] = current_network
|
||||
|
||||
var/list/all_networks[0]
|
||||
for(var/network in using_map.station_networks)
|
||||
for(var/network in GLOB.using_map.station_networks)
|
||||
if(can_access_network(user, get_camera_access(network), 1))
|
||||
all_networks.Add(list(list(
|
||||
"tag" = network,
|
||||
"has_access" = 1
|
||||
)))
|
||||
for(var/network in using_map.secondary_networks)
|
||||
for(var/network in GLOB.using_map.secondary_networks)
|
||||
if(can_access_network(user, get_camera_access(network), 0))
|
||||
all_networks.Add(list(list(
|
||||
"tag" = network,
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
else if(href_list["switch_network"])
|
||||
// Either security access, or access to the specific camera network's department is required in order to access the network.
|
||||
if(can_access_network(usr, get_camera_access(href_list["switch_network"]), (href_list["switch_network"] in using_map.station_networks)))
|
||||
if(can_access_network(usr, get_camera_access(href_list["switch_network"]), (href_list["switch_network"] in GLOB.using_map.station_networks)))
|
||||
current_network = href_list["switch_network"]
|
||||
else
|
||||
to_chat(usr, "\The [nano_host()] shows an \"Network Access Denied\" error message.")
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
|
||||
/datum/nano_module/crew_monitor/Topic(href, href_list)
|
||||
if(..()) return 1
|
||||
var/turf/T = get_turf(nano_host()) // TODO: Allow setting any using_map.contact_levels from the interface.
|
||||
if (!T || !(T.z in using_map.player_levels))
|
||||
var/turf/T = get_turf(nano_host()) // TODO: Allow setting any GLOB.using_map.contact_levels from the interface.
|
||||
if (!T || !(T.z in GLOB.using_map.player_levels))
|
||||
usr << "<span class='warning'>Unable to establish a connection</span>: You're too far away from the station!"
|
||||
return 0
|
||||
if(href_list["track"])
|
||||
@@ -37,7 +37,7 @@
|
||||
var/turf/T = get_turf(nano_host())
|
||||
|
||||
data["isAI"] = isAI(user)
|
||||
data["map_levels"] = using_map.get_map_levels(T.z, FALSE)
|
||||
data["map_levels"] = GLOB.using_map.get_map_levels(T.z, FALSE)
|
||||
data["crewmembers"] = list()
|
||||
for(var/z in data["map_levels"]) // VOREStation Edit
|
||||
data["crewmembers"] += crew_repository.health_data(z)
|
||||
|
||||
+1
-1
@@ -125,7 +125,7 @@
|
||||
return 1
|
||||
|
||||
if(href_list["newaccount"])
|
||||
var/newdomain = sanitize(input(user,"Pick domain:", "Domain name") as null|anything in using_map.usable_email_tlds)
|
||||
var/newdomain = sanitize(input(user,"Pick domain:", "Domain name") as null|anything in GLOB.using_map.usable_email_tlds)
|
||||
if(!newdomain)
|
||||
return 1
|
||||
var/newlogin = sanitize(input(user,"Pick account name (@[newdomain]):", "Account name"), 100)
|
||||
|
||||
Reference in New Issue
Block a user