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 14:13:06 -04:00
committed by GitHub
parent 62593e66de
commit 565787dae6
5 changed files with 85 additions and 17 deletions
+17 -16
View File
@@ -31,19 +31,20 @@
#define BACK_LAYER 30
#define HAIR_LAYER 31
#define HAIR_LAYER_EMISSIVE 32
#define GLASSES_LAYER_ALT 33
#define L_EAR_LAYER 34
#define R_EAR_LAYER 35
#define FACEMASK_LAYER 36
#define HEAD_LAYER 37
#define L_EAR_LAYER_ALT 38
#define R_EAR_LAYER_ALT 39
#define GLASSES_LAYER_OVER 40
#define COLLAR_LAYER 41
#define ABOVE_SUIT_LAYER_WR 42
#define HANDCUFF_LAYER 43
#define LEGCUFF_LAYER 44
#define L_HAND_LAYER 45
#define R_HAND_LAYER 46
#define FIRE_LAYER_UPPER 47
#define TOTAL_LAYERS 47
#define L_EAR_LAYER 33
#define R_EAR_LAYER 34
#define HEAD_LAYER_ALT 35
#define GLASSES_LAYER_ALT 36
#define FACEMASK_LAYER 37
#define HEAD_LAYER 38
#define L_EAR_LAYER_ALT 39
#define R_EAR_LAYER_ALT 40
#define GLASSES_LAYER_OVER 41
#define COLLAR_LAYER 42
#define ABOVE_SUIT_LAYER_WR 43
#define HANDCUFF_LAYER 44
#define LEGCUFF_LAYER 45
#define L_HAND_LAYER 46
#define R_HAND_LAYER 47
#define FIRE_LAYER_UPPER 48
#define TOTAL_LAYERS 48
+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)
@@ -0,0 +1,58 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# - (fixes bugs)
# wip
# - (work in progress)
# qol
# - (quality of life)
# soundadd
# - (adds a sound)
# sounddel
# - (removes a sound)
# rscadd
# - (adds a feature)
# rscdel
# - (removes a feature)
# imageadd
# - (adds an image or sprite)
# imagedel
# - (removes an image or sprite)
# spellcheck
# - (fixes spelling or grammar)
# experiment
# - (experimental change)
# balance
# - (balance changes)
# code_imp
# - (misc internal code change)
# refactor
# - (refactors code)
# config
# - (makes a change to the config files)
# admin
# - (makes changes to administrator tools)
# server
# - (miscellaneous changes to server)
#################################
# Your name.
author: SierraKomodo
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Welding goggles now render on top of bandanas when flipped up."