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