[MIRROR] next globs (#12552)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-03-18 16:20:05 -07:00
committed by GitHub
parent 73faa45a34
commit 5567a1a245
57 changed files with 367 additions and 365 deletions
+1 -1
View File
@@ -37,7 +37,7 @@
/obj/effect/overmap/Initialize(mapload)
. = ..()
if(!global.using_map.use_overmap)
if(!using_map.use_overmap)
return INITIALIZE_HINT_QDEL
if(render_map) // Initialize map objects
+20 -20
View File
@@ -59,13 +59,13 @@
find_z_levels() // This populates map_z and assigns z levels to the ship.
register_z_levels() // This makes external calls to update global z level information.
if(!global.using_map.overmap_z)
if(!using_map.overmap_z)
build_overmap()
start_x = start_x || rand(OVERMAP_EDGE, global.using_map.overmap_size - OVERMAP_EDGE)
start_y = start_y || rand(OVERMAP_EDGE, global.using_map.overmap_size - OVERMAP_EDGE)
start_x = start_x || rand(OVERMAP_EDGE, using_map.overmap_size - OVERMAP_EDGE)
start_y = start_y || rand(OVERMAP_EDGE, using_map.overmap_size - OVERMAP_EDGE)
forceMove(locate(start_x, start_y, global.using_map.overmap_z))
forceMove(locate(start_x, start_y, using_map.overmap_z))
// CHOMPAdd Start
if(dyn_poi)
@@ -166,27 +166,27 @@
for(var/zlevel in map_z)
GLOB.map_sectors["[zlevel]"] = src
global.using_map.player_levels |= map_z
using_map.player_levels |= map_z
if(!in_space)
global.using_map.sealed_levels |= map_z
using_map.sealed_levels |= map_z
/* VOREStation Removal - We have a map system that does this already.
if(base)
global.using_map.station_levels |= map_z
global.using_map.contact_levels |= map_z
global.using_map.map_levels |= map_z
using_map.station_levels |= map_z
using_map.contact_levels |= map_z
using_map.map_levels |= map_z
*/
/obj/effect/overmap/visitable/proc/unregister_z_levels()
GLOB.map_sectors -= map_z
global.using_map.player_levels -= map_z
using_map.player_levels -= map_z
if(!in_space)
global.using_map.sealed_levels -= map_z
using_map.sealed_levels -= map_z
/* VOREStation Removal - We have a map system that does this already.
if(base)
global.using_map.station_levels -= map_z
global.using_map.contact_levels -= map_z
global.using_map.map_levels -= map_z
using_map.station_levels -= map_z
using_map.contact_levels -= map_z
using_map.map_levels -= map_z
*/
/obj/effect/overmap/visitable/get_scan_data()
@@ -308,23 +308,23 @@
GLOB.priority_announcement.Announce(message, new_title = "Automated Distress Signal", new_sound = 'sound/AI/sos_ch.ogg', zlevel = zlevel) //CHOMPedit, changed sound
/proc/build_overmap()
if(!global.using_map.use_overmap)
if(!using_map.use_overmap)
return 1
testing("Building overmap...")
world.increment_max_z()
global.using_map.overmap_z = world.maxz
using_map.overmap_z = world.maxz
testing("Putting overmap on [global.using_map.overmap_z]")
testing("Putting overmap on [using_map.overmap_z]")
var/area/overmap/A = new
for(var/turf/T as anything in block(locate(1,1,global.using_map.overmap_z), locate(global.using_map.overmap_size,global.using_map.overmap_size,global.using_map.overmap_z)))
if(T.x == 1 || T.y == 1 || T.x == global.using_map.overmap_size || T.y == global.using_map.overmap_size)
for(var/turf/T as anything in block(locate(1,1,using_map.overmap_z), locate(using_map.overmap_size,using_map.overmap_size,using_map.overmap_z)))
if(T.x == 1 || T.y == 1 || T.x == using_map.overmap_size || T.y == using_map.overmap_size)
T = T.ChangeTurf(/turf/unsimulated/map/edge)
else
T = T.ChangeTurf(/turf/unsimulated/map)
ChangeArea(T, A)
global.using_map.sealed_levels |= global.using_map.overmap_z
using_map.sealed_levels |= using_map.overmap_z
if(!GLOB.dynamic_sector_master) //CHOMPedit: hook dynamic sector generation into overmap gen
new /obj/effect/overmap/visitable/dynamic // CHOMPedit, glob var assignment is handled in the object.
+1 -1
View File
@@ -56,7 +56,7 @@ GLOBAL_LIST_EMPTY(all_waypoints)
/obj/machinery/computer/ship/helm/process()
..()
if(autopilot && dx && dy && !autopilot_disabled)
var/turf/T = locate(dx,dy,global.using_map.overmap_z)
var/turf/T = locate(dx,dy,using_map.overmap_z)
if(linked.loc == T)
if(linked.is_still())
autopilot = 0
+4 -4
View File
@@ -12,7 +12,7 @@
start_x = loc.x
start_y = loc.y
// But pick an empty z level to use
map_z += global.using_map.get_empty_zlevel()
map_z += using_map.get_empty_zlevel()
. = ..()
if(!map_z[1])
log_and_message_admins("Could not create empty sector at [x], [y]. No available z levels to allocate.")
@@ -26,7 +26,7 @@
return ..()
/obj/effect/overmap/visitable/sector/temporary/find_z_levels()
LAZYADD(map_z, global.using_map.get_empty_zlevel())
LAZYADD(map_z, using_map.get_empty_zlevel())
/obj/effect/overmap/visitable/sector/temporary/proc/is_empty(var/mob/observer)
if(!LAZYLEN(map_z))
@@ -44,7 +44,7 @@
qdel(src)
/proc/get_deepspace(x,y)
var/turf/unsimulated/map/overmap_turf = locate(x,y,global.using_map.overmap_z)
var/turf/unsimulated/map/overmap_turf = locate(x,y,using_map.overmap_z)
if(!istype(overmap_turf))
CRASH("Attempt to get deepspace at ([x],[y]) which is not on overmap: [overmap_turf]")
var/obj/effect/overmap/visitable/sector/temporary/res = locate() in overmap_turf
@@ -133,7 +133,7 @@
testing("[A] spacemoving from [M] ([M.x], [M.y]).")
var/turf/map = locate(M.x,M.y,global.using_map.overmap_z)
var/turf/map = locate(M.x,M.y,using_map.overmap_z)
var/obj/effect/overmap/visitable/TM
for(var/obj/effect/overmap/visitable/O in map)
if(O != M && O.in_space && prob(50))
+5 -5
View File
@@ -56,11 +56,11 @@ GLOBAL_LIST_EMPTY(map_sectors)
name = "[x]-[y]"
var/list/numbers = list()
if(x == 1 || x == global.using_map.overmap_size)
if(x == 1 || x == using_map.overmap_size)
numbers += list("[round(y/10)]","[round(y%10)]")
if(y == 1 || y == global.using_map.overmap_size)
if(y == 1 || y == using_map.overmap_size)
numbers += "-"
if(y == 1 || y == global.using_map.overmap_size)
if(y == 1 || y == using_map.overmap_size)
numbers += list("[round(x/10)]","[round(x%10)]")
for(var/i = 1 to numbers.len)
@@ -70,12 +70,12 @@ GLOBAL_LIST_EMPTY(map_sectors)
if(y == 1)
I.pixel_y = 3
I.pixel_x = 5*i + 4
if(y == global.using_map.overmap_size)
if(y == using_map.overmap_size)
I.pixel_y = world.icon_size - 9
I.pixel_x = 5*i + 4
if(x == 1)
I.pixel_x = 5*i - 2
if(x == global.using_map.overmap_size)
if(x == using_map.overmap_size)
I.pixel_x = 5*i + 2
add_overlay(I)
AddElement(/datum/element/turf_z_transparency)