Welding goggles render over bandanas (#22414)

Port of a 'fix' I made on baystation some time back.

Before:
<img width="81" height="89" alt="dreamseeker_JD60oIjWBj"
src="https://github.com/user-attachments/assets/bab4fc4a-96ea-4719-b318-e9ebb0f99dda"
/>

After:
<img width="89" height="88" alt="dreamseeker_FwOnslm1q7"
src="https://github.com/user-attachments/assets/e6d4da4b-2269-4cc5-9cf7-ac4c73bfc993"
/>
This commit is contained in:
SierraKomodo
2026-05-11 18:13:06 +00:00
committed by GitHub
parent 62593e66de
commit 565787dae6
5 changed files with 85 additions and 17 deletions
+2
View File
@@ -613,6 +613,8 @@
var/light_applied
var/on = FALSE
var/protects_against_weather = FALSE
/// Boolean. If set, uses `HEAD_LAYER_ALT` for mob sprite layering.
var/use_alt_layer = FALSE
/obj/item/clothing/head/Initialize(mapload, material_key)
. = ..()
+1
View File
@@ -7,6 +7,7 @@
flags_inv = 0
body_parts_covered = 0
contained_sprite = TRUE
use_alt_layer = TRUE
/obj/item/clothing/head/bandana/colorable
icon_state = "bandana_colorable"
@@ -910,6 +910,7 @@ There are several things that need to be remembered:
return
overlays_raw[HEAD_LAYER] = null
overlays_raw[HEAD_LAYER_ALT] = null
if(head)
var/mob_icon = INV_HEAD_DEF_ICON
var/mob_state = head.icon_state
@@ -933,7 +934,12 @@ There are several things that need to be remembered:
else
mob_icon = INV_HEAD_DEF_ICON
overlays_raw[HEAD_LAYER] = head.get_mob_overlay(src, mob_icon, mob_state, slot_head_str)
var/overlay_layer = HEAD_LAYER
if (istype(head, /obj/item/clothing/head))
var/obj/item/clothing/head/clothing = head
if (clothing.use_alt_layer)
overlay_layer = HEAD_LAYER_ALT
overlays_raw[overlay_layer] = head.get_mob_overlay(src, mob_icon, mob_state, slot_head_str)
if (recurse)
update_hair(FALSE)