some more globals (#19098)

* some more globals

* .
This commit is contained in:
Kashargul
2026-01-29 18:21:58 +01:00
committed by GitHub
parent 24e68536bc
commit fdfb49012b
50 changed files with 164 additions and 176 deletions
+3 -3
View File
@@ -218,8 +218,8 @@ GLOBAL_LIST_EMPTY(limb_icon_cache)
// damage amount to represent the pain of the injuries involved.
// Global scope, used in code below.
var/list/flesh_hud_colours = list("#02BA08","#9ECF19","#DEDE10","#FFAA00","#FF0000","#AA0000","#660000")
var/list/robot_hud_colours = list("#CFCFCF","#AFAFAF","#8F8F8F","#6F6F6F","#4F4F4F","#2F2F2F","#000000")
GLOBAL_LIST_INIT(flesh_hud_colours, list("#02BA08","#9ECF19","#DEDE10","#FFAA00","#FF0000","#AA0000","#660000"))
GLOBAL_LIST_INIT(robot_hud_colours, list("#CFCFCF","#AFAFAF","#8F8F8F","#6F6F6F","#4F4F4F","#2F2F2F","#000000"))
/obj/item/organ/external/proc/get_damage_hud_image(var/min_dam_state)
@@ -254,6 +254,6 @@ var/list/robot_hud_colours = list("#CFCFCF","#AFAFAF","#8F8F8F","#6F6F6F","#4F4F
if(!isnull(min_dam_state) && dam_state < min_dam_state)
dam_state = min_dam_state
// Apply colour and return product.
var/list/hud_colours = (robotic < ORGAN_ROBOT) ? flesh_hud_colours : robot_hud_colours
var/list/hud_colours = (robotic < ORGAN_ROBOT) ? GLOB.flesh_hud_colours : GLOB.robot_hud_colours
hud_damage_image.color = hud_colours[max(1,min(CEILING(dam_state*hud_colours.len, 1),hud_colours.len))]
return hud_damage_image