Ports the TG globals controller and converts globals. (#18057)

* SDQL2 update

* fix that verb

* cl

* fix that

* toworld

* this is pointless

* update info

* siiiiick..

* vv edit update

* fix that

* fix editing vars

* fix VV

* Port the /TG/ globals controller.

* part 1

* part 2

* oops

* part 3

* Hollow Purple

* sadas

* bsbsdb

* muda na agaki ta

* ids 1-15

* 16-31

* 41-75

* bring me back to how things used to be before i lost it all

* the strength of mayhem

* final touches

* cl

* protect some vars

* update sdql2 to use glob

* stuff?

* forgot that is not defined there

* whoops

* observ

* but it never gets better

* a

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2023-12-26 01:16:02 +00:00
committed by GitHub
co-authored by Matt Atlas
parent 19292f01d3
commit cadd19beac
966 changed files with 4785 additions and 4784 deletions
@@ -136,7 +136,7 @@ SUBSYSTEM_DEF(atlas)
)
/datum/controller/subsystem/atlas/stat_entry(msg)
msg = "W:{X:[world.maxx] Y:[world.maxy] Z:[world.maxz]} ZL:[z_levels]"
msg = "W:{X:[world.maxx] Y:[world.maxy] Z:[world.maxz]} ZL:[GLOB.z_levels]"
return ..()
/datum/controller/subsystem/atlas/Initialize(timeofday)
@@ -192,8 +192,8 @@ SUBSYSTEM_DEF(atlas)
var/chosen_sector
var/using_sector_config = FALSE
if(config.current_space_sector)
chosen_sector = config.current_space_sector
if(GLOB.config.current_space_sector)
chosen_sector = GLOB.config.current_space_sector
using_sector_config = TRUE
else
chosen_sector = current_map.default_sector
@@ -247,9 +247,9 @@ SUBSYSTEM_DEF(atlas)
CHECK_TICK
/datum/controller/subsystem/atlas/proc/get_selected_map()
if (config.override_map)
if (known_maps[config.override_map])
. = config.override_map
if (GLOB.config.override_map)
if (known_maps[GLOB.config.override_map])
. = GLOB.config.override_map
log_subsystem_atlas("Using configured map.")
else
log_config("-- WARNING: CONFIGURED MAP DOES NOT EXIST, IGNORING! --")
@@ -311,8 +311,8 @@ SUBSYSTEM_DEF(atlas)
. = current_map.station_name
var/sname
if (config && config.server_name)
sname = "[config.server_name]: [.]"
if (GLOB.config && GLOB.config.server_name)
sname = "[GLOB.config.server_name]: [.]"
else
sname = .
@@ -18,10 +18,10 @@ SUBSYSTEM_DEF(finalize)
load_space_ruin()
if(config.dungeon_chance > 0)
if(GLOB.config.dungeon_chance > 0)
place_dungeon_spawns()
if(config.generate_asteroid)
if(GLOB.config.generate_asteroid)
time = world.time
current_map.generate_asteroid()
log_subsystem_mapfinalization("Generated asteroid in [(world.time - time)/10] seconds.")
@@ -38,11 +38,11 @@ SUBSYSTEM_DEF(finalize)
..()
/proc/resort_all_areas()
all_areas = list()
GLOB.all_areas = list()
for (var/area/A in world)
all_areas += A
GLOB.all_areas += A
sortTim(all_areas, GLOBAL_PROC_REF(cmp_name_asc))
sortTim(GLOB.all_areas, GLOBAL_PROC_REF(cmp_name_asc))
/datum/controller/subsystem/finalize/proc/load_space_ruin()
maploader = new
@@ -73,11 +73,11 @@ SUBSYSTEM_DEF(finalize)
var/dungeons_placed = 0
var/dmm_suite/maploader = new
var/dungeon_chance = config.dungeon_chance
var/dungeon_chance = GLOB.config.dungeon_chance
log_subsystem_mapfinalization("Attempting to create asteroid dungeons for [length(asteroid_spawn)] different areas, with [length(files) - 1] possible dungeons, with a [dungeon_chance]% chance to spawn a dungeon per area.")
log_subsystem_mapfinalization("Attempting to create asteroid dungeons for [length(GLOB.asteroid_spawn)] different areas, with [length(files) - 1] possible dungeons, with a [dungeon_chance]% chance to spawn a dungeon per area.")
for(var/turf/spawn_location in asteroid_spawn)
for(var/turf/spawn_location in GLOB.asteroid_spawn)
if(length(files) <= 0) //Sanity
log_subsystem_mapfinalization("There aren't enough dungeon map files to fill the entire dungeon map. There may be less dungeons than expected.")
@@ -113,7 +113,7 @@ SUBSYSTEM_DEF(finalize)
if(!selected_mission)
return
var/report_text = selected_mission.get_contact_report()
for(var/obj/effect/landmark/C in landmarks_list)
for(var/obj/effect/landmark/C in GLOB.landmarks_list)
if(C.name == "Mission Paper")
var/obj/item/paper/P = new /obj/item/paper(get_turf(C))
P.name = "Icarus reading report"
@@ -40,7 +40,7 @@ SUBSYSTEM_DEF(misc_early)
// Setup ore.
for(var/oretype in subtypesof(/ore))
var/ore/OD = new oretype()
ore_data[OD.name] = OD
GLOB.ore_data[OD.name] = OD
// Setup cargo spawn lists.
setup_cargo_spawn_lists()
@@ -7,21 +7,21 @@ SUBSYSTEM_DEF(misc_late)
/datum/controller/subsystem/misc_late/Initialize(timeofday)
// Setup the teleport locs.
for(var/area/AR as anything in the_station_areas)
for(var/area/AR as anything in GLOB.the_station_areas)
if(AR.area_flags & AREA_FLAG_NO_GHOST_TELEPORT_ACCESS)
continue
var/list/area_turfs = AR.contents
if (area_turfs.len) // Check the area is mapped
ghostteleportlocs += AR.name
ghostteleportlocs[AR.name] = AR
GLOB.ghostteleportlocs += AR.name
GLOB.ghostteleportlocs[AR.name] = AR
if(current_map.use_overmap && map_overmap)
ghostteleportlocs[map_overmap.name] = map_overmap
GLOB.ghostteleportlocs[map_overmap.name] = map_overmap
sortTim(ghostteleportlocs, GLOBAL_PROC_REF(cmp_text_asc))
sortTim(GLOB.ghostteleportlocs, GLOBAL_PROC_REF(cmp_text_asc))
setupgenetics()
if (config.fastboot)
if (GLOB.config.fastboot)
admin_notice("<span class='notice'><b>Fastboot is enabled; some features may not be available.</b></span>", R_DEBUG)
populate_code_phrases()
@@ -31,12 +31,12 @@ SUBSYSTEM_DEF(misc_late)
thing.do_late_fire()
LAZYREMOVE(SSatoms.late_loaders, thing)
if (config.use_forumuser_api)
if (GLOB.config.use_forumuser_api)
update_admins_from_api(TRUE)
..(timeofday)
/proc/sorted_add_area(area/A)
all_areas += A
GLOB.all_areas += A
sortTim(all_areas, GLOBAL_PROC_REF(cmp_name_asc))
sortTim(GLOB.all_areas, GLOBAL_PROC_REF(cmp_name_asc))
@@ -54,7 +54,7 @@ SUBSYSTEM_DEF(persistent_configuration)
/datum/controller/subsystem/persistent_configuration/proc/populate_variables(list/decoded)
IF_FOUND_USE(decoded, last_gamemode)
master_mode = last_gamemode
GLOB.master_mode = last_gamemode
IF_FOUND_CONV(decoded, rounds_since_hard_restart, text2num)
IF_FOUND_USE(decoded, forced_awaymission)