mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
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:
@@ -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()]."))
|
||||
|
||||
Reference in New Issue
Block a user