using map global variable

This commit is contained in:
kevinz000
2020-04-09 21:08:18 -07:00
parent bc122fac51
commit b0b49a4831
169 changed files with 403 additions and 402 deletions
@@ -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!
@@ -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/))