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
+3 -3
View File
@@ -315,8 +315,8 @@
LAZYADD(cached_markings, temporary_markings)
// Global scope, used in code below.
var/list/flesh_hud_colours = list("#00ff00","#aaff00","#ffff00","#ffaa00","#ff0000","#aa0000","#660000")
var/list/robot_hud_colours = list("#ffffff","#cccccc","#aaaaaa","#888888","#666666","#444444","#222222","#000000")
GLOBAL_LIST_INIT(flesh_hud_colours, list("#00ff00","#aaff00","#ffff00","#ffaa00","#ff0000","#aa0000","#660000"))
GLOBAL_LIST_INIT(robot_hud_colours, list("#ffffff","#cccccc","#aaaaaa","#888888","#666666","#444444","#222222","#000000"))
/obj/item/organ/external/proc/get_damage_hud_image()
@@ -344,7 +344,7 @@ var/list/robot_hud_colours = list("#ffffff","#cccccc","#aaaaaa","#888888","#6666
if(min_dam_state && dam_state < min_dam_state)
dam_state = min_dam_state
// Apply colour and return product.
var/list/hud_colours = !BP_IS_ROBOTIC(src) ? flesh_hud_colours : robot_hud_colours
var/list/hud_colours = !BP_IS_ROBOTIC(src) ? GLOB.flesh_hud_colours : GLOB.robot_hud_colours
hud_damage_image.color = hud_colours[max(1,min(Ceiling(dam_state*hud_colours.len),hud_colours.len))]
return hud_damage_image
@@ -16,5 +16,5 @@
to_chat(owner, SPAN_NOTICE("Hello [user], it is currently: '[worldtime2text()]'. Today's date is '[time2text(world.time, "Month DD")]. [GLOB.game_year]'. Have a lovely day."))
if(evacuation_controller.get_status_panel_eta())
to_chat(owner, SPAN_WARNING("Notice: You have one (1) scheduled flight, ETA: [evacuation_controller.get_status_panel_eta()]."))
if(GLOB.evacuation_controller.get_status_panel_eta())
to_chat(owner, SPAN_WARNING("Notice: You have one (1) scheduled flight, ETA: [GLOB.evacuation_controller.get_status_panel_eta()]."))