From 2e19e1fedc7780ed491c42ec55fbb111fc7416e2 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Tue, 12 Nov 2024 17:12:57 +0100 Subject: [PATCH] [NO GBP] Fixes hat stabilizer ignoring clothing worn_y_offset (#87851) ## About The Pull Request Closes #87487 ![image](https://github.com/user-attachments/assets/d7b501e2-b026-4254-bbd5-919a3e18259b) ## Changelog :cl: fix: Fixed hat stabilizer ignoring clothing worn_y_offset /:cl: --- code/datums/components/hat_stabilizer.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/datums/components/hat_stabilizer.dm b/code/datums/components/hat_stabilizer.dm index 7a4033c3b2b..6dfe2dfa5d9 100644 --- a/code/datums/components/hat_stabilizer.dm +++ b/code/datums/components/hat_stabilizer.dm @@ -44,11 +44,13 @@ return if(attached_hat) var/mutable_appearance/worn_overlay = attached_hat.build_worn_icon(default_layer = ABOVE_BODY_FRONT_HEAD_LAYER-0.1, default_icon_file = 'icons/mob/clothing/head/default.dmi') - worn_overlay.pixel_y = pixel_y_offset + worn_overlay.pixel_y = pixel_y_offset + attached_hat.worn_y_offset overlays += worn_overlay /datum/component/hat_stabilizer/proc/on_update_overlays(atom/movable/source, list/overlays) SIGNAL_HANDLER + if (isnull(attached_hat)) + return var/mutable_appearance/worn_overlay = use_worn_icon ? attached_hat.build_worn_icon(default_layer = ABOVE_OBJ_LAYER, default_icon_file = 'icons/mob/clothing/head/default.dmi') : mutable_appearance(attached_hat, layer = ABOVE_OBJ_LAYER) worn_overlay.pixel_y = pixel_y_offset overlays += worn_overlay