From 0607b2847cda61ec3121f4e03c3e9b4bad986058 Mon Sep 17 00:00:00 2001 From: Sparky Date: Thu, 7 Sep 2023 18:03:11 +0100 Subject: [PATCH] Sprite Accent Fix (#17260) Fixes an issue where toggleable sprites end up with both versions of their accents overlayed. --- code/game/objects/items.dm | 4 +++- html/changelogs/accent_fix.yml | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/accent_fix.yml diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 504ff1ac575..3bf9deb7a2b 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -127,9 +127,11 @@ /obj/item/update_icon() . = ..() + if(build_from_parts || has_accents) + cut_overlays() if(build_from_parts) add_overlay(overlay_image(icon,"[icon_state]_[worn_overlay]", flags=RESET_COLOR)) //add the overlay w/o coloration of the original sprite - if(accent_color && has_accents) + if(has_accents) add_overlay(overlay_image(icon,"[icon_state]_acc",accent_color, RESET_COLOR)) /obj/item/device diff --git a/html/changelogs/accent_fix.yml b/html/changelogs/accent_fix.yml new file mode 100644 index 00000000000..017ccd951ad --- /dev/null +++ b/html/changelogs/accent_fix.yml @@ -0,0 +1,6 @@ +author: Sparky_hotdog + +delete-after: True + +changes: + - bugfix: "Fixed overlays sticking for accent items when toggled."