diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index aedd7839ce..a88cd5033c 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -9,6 +9,11 @@ slot_flags = 0 w_class = 2.0 var/obj/item/clothing/under/has_suit = null //the suit the tie may be attached to + var/image/inv_overlay = null //overlay used when attached to clothing. + +/obj/item/clothing/tie/New() + ..() + inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[item_color? "[item_color]" : "[icon_state]"]") //when user attached an accessory to S /obj/item/clothing/tie/proc/on_attached(obj/item/clothing/under/S, mob/user as mob) @@ -16,12 +21,15 @@ return has_suit = S loc = has_suit + has_suit.overlays += inv_overlay + user << "You attach [src] to [has_suit]." src.add_fingerprint(user) /obj/item/clothing/tie/proc/on_removed(mob/user as mob) if(!has_suit) return + has_suit.overlays -= inv_overlay has_suit = null usr.put_in_hands(src) src.add_fingerprint(user) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 2c4a381d6e..72232764d1 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -501,6 +501,7 @@ proc/get_damage_icon_part(damage_state, body_part) overlays_standing[UNIFORM_LAYER] = standing else overlays_standing[UNIFORM_LAYER] = null + // This really, really seems like it should not be mixed in the middle of display code... // Automatically drop anything in store / id / belt if you're not wearing a uniform. //CHECK IF NECESARRY for( var/obj/item/thing in list(r_store, l_store, wear_id, belt) ) // if(thing) // diff --git a/icons/obj/clothing/ties_overlay.dmi b/icons/obj/clothing/ties_overlay.dmi new file mode 100644 index 0000000000..6c6a65afc1 Binary files /dev/null and b/icons/obj/clothing/ties_overlay.dmi differ