Turn more unmanaged global vars into GLOB (#20446)

Turned a ton of unmanaged globals into managed globals.
Refactored some UT output.
Removed some unused things, including vars.
Added a test to ensure people don't keep adding new unmanaged vars.
This commit is contained in:
Fluffy
2025-02-17 23:34:02 +00:00
committed by GitHub
parent eff1fb22de
commit 7265630dde
377 changed files with 1893 additions and 2288 deletions
@@ -656,11 +656,11 @@
var/stocktype = pickweight(spawntypes)
switch (stocktype)
if ("1")
return pickweight(random_stock_rare)
return pickweight(GLOB.random_stock_rare)
if ("2")
return pickweight(random_stock_uncommon)
return pickweight(GLOB.random_stock_uncommon)
if ("3")
return pickweight(random_stock_common)
return pickweight(GLOB.random_stock_common)
/obj/structure/closet/crate/extinguisher_cartridges
name = "crate of extinguisher cartridges"
@@ -19,7 +19,7 @@
/obj/structure/undies_wardrobe/interact(var/mob/living/carbon/human/H)
var/dat = list()
dat += "<b>Underwear:</b><br>"
for(var/datum/category_group/underwear/UWC in global_underwear.categories)
for(var/datum/category_group/underwear/UWC in GLOB.global_underwear.categories)
var/datum/category_item/underwear/UWI = H.all_underwear[UWC.name]
var/item_name = UWI?.name || "None"
dat += "[UWC.name]: <a href='?src=[REF(src)];change_underwear=[UWC.name]'>[item_name]</a>"
@@ -68,7 +68,7 @@
H.all_underwear -= href_list["remove_underwear"]
. = TRUE
else if(href_list["change_underwear"])
var/datum/category_group/underwear/UWC = global_underwear.categories_by_name[href_list["change_underwear"]]
var/datum/category_group/underwear/UWC = GLOB.global_underwear.categories_by_name[href_list["change_underwear"]]
if(!UWC)
return
var/datum/category_item/underwear/selected_underwear = tgui_input_list(H, "Choose your underwear.", "Choose Underwear", UWC.items, H.all_underwear[UWC.name])