From 33994b6fcce89ec32f59be308a6071b9f571d014 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 10 Mar 2023 03:42:22 +0100 Subject: [PATCH] [MIRROR] Fixes dog fashion items not clearing up when removed from the dog & fixes armor vest dog fashion [MDB IGNORE] (#19642) * Fixes dog fashion items not clearing up when removed from the dog & fixes armor vest dog fashion (#73743) ## About The Pull Request Restores a `cut_overlays()` to dog's `regenerate_icons()` that was lost back in #70799. Also makes an armorvest back fashion for armor vests. When a dog fashion datum doesn't have `obj_icon_state` declared, it defaults to the assigned item's icon. Dog fashion's sprite sheet has the armor vest sprite saved as _armor_. And the only vest that would actually show on a dog would be an _alt_ armor vest. Apparently, the standard-issue armor vest uses _armoralt_ icons. Go figure. However, there are quite a few armor vest subtypes that don't look anything like the base vest; this needs addressing by either banning such vests from being used as dog fashion items, or making separate sprites for them (to be fair, the current dog fashion armor vest needs an update as well, it's quite old and doesn't correspond to the current armor vest). - [x] go around and remove dog fashion from armor vests that don't look like the base vest ## Why It's Good For The Game Closes #59224 (hats as items were not stuck, but their sprites were); dog's sprites will correctly update upon placing/removing a fashion item Most armor vests placed on a dog will actually show on the sprite ## Changelog :cl: fix: undressing a hat/back item from a dog will correctly remove the item's overlay fix: most armor vests will actually show on a dog when placed on its back /:cl: * Fixes dog fashion items not clearing up when removed from the dog & fixes armor vest dog fashion --------- Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com> --- code/datums/dog_fashion.dm | 11 +++++++---- code/modules/clothing/suits/armor.dm | 7 ++++++- code/modules/mob/living/basic/pets/dog.dm | 1 + 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/code/datums/dog_fashion.dm b/code/datums/dog_fashion.dm index 7daffcfc204..d35771027b3 100644 --- a/code/datums/dog_fashion.dm +++ b/code/datums/dog_fashion.dm @@ -47,6 +47,13 @@ /datum/dog_fashion/back icon_file = 'icons/mob/simple/corgi_back.dmi' +/datum/dog_fashion/back/armorvest + obj_icon_state = "armor" + +/datum/dog_fashion/back/deathsquad + name = "Trooper REAL_NAME" + desc = "That's not red paint. That's real corgi blood." + /datum/dog_fashion/head/helmet name = "Sergeant REAL_NAME" desc = "The ever-loyal, the ever-vigilant." @@ -178,10 +185,6 @@ speak = list("HONK!", "Honk!") emote_see = list("plays tricks.", "slips.") -/datum/dog_fashion/back/deathsquad - name = "Trooper REAL_NAME" - desc = "That's not red paint. That's real corgi blood." - /datum/dog_fashion/head/festive name = "Festive REAL_NAME" desc = "Ready to party!" diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index c824859984c..3314245f7c1 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -34,7 +34,7 @@ icon_state = "armoralt" inhand_icon_state = "armor" blood_overlay_type = "armor" - dog_fashion = /datum/dog_fashion/back + dog_fashion = /datum/dog_fashion/back/armorvest /obj/item/clothing/suit/armor/vest/alt desc = "A Type I armored vest that provides decent protection against most types of damage." @@ -100,6 +100,7 @@ desc = "A lighter plate armor used to still keep out those pesky arrows, while retaining the ability to move." icon_state = "cuirass" inhand_icon_state = "armor" + dog_fashion = null /obj/item/clothing/suit/armor/hos name = "armored greatcoat" @@ -514,6 +515,7 @@ max_integrity = 200 resistance_flags = FLAMMABLE armor_type = /datum/armor/vest_durathread + dog_fashion = null /datum/armor/vest_durathread melee = 20 @@ -530,6 +532,7 @@ icon_state = "rus_armor" inhand_icon_state = null armor_type = /datum/armor/vest_russian + dog_fashion = null /datum/armor/vest_russian melee = 25 @@ -549,6 +552,7 @@ cold_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT armor_type = /datum/armor/vest_russian_coat + dog_fashion = null /datum/armor/vest_russian_coat melee = 25 @@ -617,3 +621,4 @@ icon_state = "hop_coat" inhand_icon_state = "b_suit" body_parts_covered = CHEST|GROIN|ARMS + dog_fashion = null diff --git a/code/modules/mob/living/basic/pets/dog.dm b/code/modules/mob/living/basic/pets/dog.dm index 82781d51abf..cc873f0a918 100644 --- a/code/modules/mob/living/basic/pets/dog.dm +++ b/code/modules/mob/living/basic/pets/dog.dm @@ -670,6 +670,7 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list( /mob/living/basic/pet/dog/corgi/regenerate_icons() ..() + cut_overlays() //we are redrawing the mob after all if(inventory_head) var/image/head_icon var/datum/dog_fashion/DF = new inventory_head.dog_fashion(src)