From 1a918c209d6ffa7e40bf0d40bfa0c701ffef0a1e Mon Sep 17 00:00:00 2001 From: Nadyr <41974248+Darlantanis@users.noreply.github.com> Date: Sat, 21 Dec 2019 01:59:21 -0500 Subject: [PATCH] Sets icon override to use teshari sprites when ponchos are worn by teshari. Otherwise it just uses ties.dmi as normal. --- code/modules/clothing/under/accessories/clothing.dm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/code/modules/clothing/under/accessories/clothing.dm b/code/modules/clothing/under/accessories/clothing.dm index d5991e4f10..bee3665283 100644 --- a/code/modules/clothing/under/accessories/clothing.dm +++ b/code/modules/clothing/under/accessories/clothing.dm @@ -62,6 +62,19 @@ "Teshari" = 'icons/mob/species/seromi/suit.dmi' ) +/obj/item/clothing/accessory/poncho/equipped() //Solution for race-specific sprites for an accessory which is also a suit. Suit icons break if you don't use icon override which then also overrides race-specific sprites. + ..() + var/mob/living/carbon/human/H = loc + if(istype(H) && H.wear_suit == src) + if(H.species.name == "Teshari") + icon_override = 'icons/mob/species/seromi/suit.dmi' + else + icon_override = 'icons/mob/ties.dmi' + update_clothing_icon() + +/obj/item/clothing/accessory/poncho/dropped() //Resets the override to prevent the wrong .dmi from being used because equipped only triggers when wearing ponchos as suits. + icon_override = null + /obj/item/clothing/accessory/poncho/green name = "green poncho" desc = "A simple, comfortable cloak without sleeves. This one is green."