From 44bfe8793990b92a77ea8d120f6c578def7b985d Mon Sep 17 00:00:00 2001 From: AmoryBlaine Date: Sun, 7 Apr 2024 20:18:51 -0400 Subject: [PATCH 1/8] Poncho fix - hides belts beneath poncho Ponchos no longer layer below belts. They go above them. Backpacks and suitslot not affected. Thanks to Rock/ForwardNSlash for this fix. --- code/__DEFINES/human.dm | 10 +++++----- code/modules/clothing/under/ties.dm | 11 +++++++++++ .../mob/living/carbon/human/update_icons.dm | 15 +++++++++++++-- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/code/__DEFINES/human.dm b/code/__DEFINES/human.dm index 4eab3d8592..95cf66c7f8 100644 --- a/code/__DEFINES/human.dm +++ b/code/__DEFINES/human.dm @@ -137,11 +137,11 @@ #define MEDICAL_LAYER 31 #define SUIT_LAYER 30 -#define SUIT_GARB_LAYER 29 -#define SUIT_SQUAD_LAYER 28 -#define GLASSES_LAYER 27 -#define BELT_LAYER 26 -#define SUIT_STORE_LAYER 25 +#define SUIT_SQUAD_LAYER 29 +#define BELT_LAYER 28 +#define SUIT_GARB_LAYER 27 +#define SUIT_STORE_LAYER 26 +#define GLASSES_LAYER 25 #define BACK_LAYER 24 #define HAIR_LAYER 23 #define HAIR_GRADIENT_LAYER 22 diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index 23080104a4..964722c3a7 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -419,6 +419,17 @@ inv_overlay = image("icon" = 'icons/obj/items/clothing/ties_overlay.dmi', "icon_state" = "[icon_state]") update_icon() +/obj/item/clothing/accessory/poncho/on_attached(obj/item/clothing/suit/storage/marine/S, mob/living/user, silent) + . =..() + if(.) + S.armor_overlays["poncho"] = src + +/obj/item/clothing/accessory/poncho/on_removed(mob/living/user, obj/item/clothing/C) + if(!has_suit) return + var/obj/item/clothing/suit/storage/marine/S = has_suit + S.armor_overlays -= "poncho" + . = ..() + /obj/item/clothing/accessory/poncho/green icon_state = "poncho" has_variation = FALSE diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 2952aa7197..ace214347c 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -557,9 +557,20 @@ Applied by gun suicide and high impact bullet executions, removed by rejuvenate, K = marine_armor.armor_overlays[i] if(K) if(!IMG) - IMG = image(K.icon,src,K.icon_state, "layer"= -SUIT_GARB_LAYER) + if(istype(K, /obj/item/clothing/accessory)) + var/obj/item/clothing/accessory/A = K + IMG = A.get_mob_overlay(src, WEAR_JACKET) + IMG.layer = -SUIT_GARB_LAYER + else + IMG = image(K.icon,src,K.icon_state, -SUIT_GARB_LAYER) else - IMG.overlays += image(K.icon,src,K.icon_state, "layer"= -SUIT_GARB_LAYER) + if(istype(K, /obj/item/clothing/accessory)) + var/obj/item/clothing/accessory/A = K + var/image/I2 = A.get_mob_overlay(src, WEAR_JACKET) + I2.layer = -SUIT_GARB_LAYER + IMG.overlays += I2 + else + IMG.overlays += image(K.icon,src,K.icon_state, -SUIT_GARB_LAYER) if(IMG) overlays_standing[SUIT_GARB_LAYER] = IMG apply_overlay(SUIT_GARB_LAYER) From 1f695015b1f45efef3282874ef7732a3127148c7 Mon Sep 17 00:00:00 2001 From: AmoryBlaine Date: Mon, 8 Apr 2024 10:03:32 -0400 Subject: [PATCH 2/8] updates the indentation i think --- code/modules/clothing/under/ties.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index 964722c3a7..3d46733182 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -425,7 +425,7 @@ S.armor_overlays["poncho"] = src /obj/item/clothing/accessory/poncho/on_removed(mob/living/user, obj/item/clothing/C) - if(!has_suit) return + if(!has_suit) return var/obj/item/clothing/suit/storage/marine/S = has_suit S.armor_overlays -= "poncho" . = ..() From 6c35e54570791539f902f6e6ebd207b9bd7f4fe3 Mon Sep 17 00:00:00 2001 From: AmoryBlaine Date: Mon, 8 Apr 2024 10:11:33 -0400 Subject: [PATCH 3/8] more fixes thank you andro for explaining how to see them :) --- code/modules/clothing/under/ties.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index 3d46733182..5f1e31592c 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -420,13 +420,13 @@ update_icon() /obj/item/clothing/accessory/poncho/on_attached(obj/item/clothing/suit/storage/marine/S, mob/living/user, silent) - . =..() - if(.) - S.armor_overlays["poncho"] = src + . =..() + if(.) + S.armor_overlays["poncho"] = src /obj/item/clothing/accessory/poncho/on_removed(mob/living/user, obj/item/clothing/C) if(!has_suit) return - var/obj/item/clothing/suit/storage/marine/S = has_suit + var/obj/item/clothing/suit/storage/marine/S = has_suit S.armor_overlays -= "poncho" . = ..() From 91c206dae466c746859232531d90ccfb53b7e231 Mon Sep 17 00:00:00 2001 From: AmoryBlaine Date: Mon, 8 Apr 2024 10:16:22 -0400 Subject: [PATCH 4/8] final fix hopefully --- code/modules/clothing/under/ties.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index 5f1e31592c..8b6cbe160e 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -415,9 +415,9 @@ /obj/item/clothing/accessory/poncho/Initialize() . = ..() if(has_variation) - select_gamemode_skin(type) - inv_overlay = image("icon" = 'icons/obj/items/clothing/ties_overlay.dmi', "icon_state" = "[icon_state]") - update_icon() + select_gamemode_skin(type) + inv_overlay = image("icon" = 'icons/obj/items/clothing/ties_overlay.dmi', "icon_state" = "[icon_state]") + update_icon() /obj/item/clothing/accessory/poncho/on_attached(obj/item/clothing/suit/storage/marine/S, mob/living/user, silent) . =..() @@ -427,8 +427,8 @@ /obj/item/clothing/accessory/poncho/on_removed(mob/living/user, obj/item/clothing/C) if(!has_suit) return var/obj/item/clothing/suit/storage/marine/S = has_suit - S.armor_overlays -= "poncho" - . = ..() + S.armor_overlays -= "poncho" + . = ..() /obj/item/clothing/accessory/poncho/green icon_state = "poncho" From 2f447f077487a68df9a879b98a5b22943c254d2d Mon Sep 17 00:00:00 2001 From: AmoryBlaine Date: Mon, 8 Apr 2024 10:38:48 -0400 Subject: [PATCH 5/8] another one --- code/modules/clothing/under/ties.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index 8b6cbe160e..974d593f81 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -415,9 +415,9 @@ /obj/item/clothing/accessory/poncho/Initialize() . = ..() if(has_variation) - select_gamemode_skin(type) - inv_overlay = image("icon" = 'icons/obj/items/clothing/ties_overlay.dmi', "icon_state" = "[icon_state]") - update_icon() + select_gamemode_skin(type) + inv_overlay = image("icon" = 'icons/obj/items/clothing/ties_overlay.dmi', "icon_state" = "[icon_state]") + update_icon() /obj/item/clothing/accessory/poncho/on_attached(obj/item/clothing/suit/storage/marine/S, mob/living/user, silent) . =..() From 198d5b89f01417fc1728af79223fe8c13eb70370 Mon Sep 17 00:00:00 2001 From: AmoryBlaine Date: Mon, 8 Apr 2024 11:07:30 -0400 Subject: [PATCH 6/8] last try before I get upset --- code/modules/clothing/under/ties.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index 974d593f81..405fa3755a 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -422,7 +422,7 @@ /obj/item/clothing/accessory/poncho/on_attached(obj/item/clothing/suit/storage/marine/S, mob/living/user, silent) . =..() if(.) - S.armor_overlays["poncho"] = src + S.armor_overlays["poncho"] = src /obj/item/clothing/accessory/poncho/on_removed(mob/living/user, obj/item/clothing/C) if(!has_suit) return From 5bfffcd1434e75abb1fb53de5ff3a373926d9f08 Mon Sep 17 00:00:00 2001 From: AmoryBlaine <32080743+AmoryBlaine@users.noreply.github.com> Date: Fri, 19 Jul 2024 19:53:02 -0400 Subject: [PATCH 7/8] Update code/modules/clothing/under/ties.dm good idea Co-authored-by: Doubleumc --- code/modules/clothing/under/ties.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index 405fa3755a..d60c06dc4f 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -425,7 +425,8 @@ S.armor_overlays["poncho"] = src /obj/item/clothing/accessory/poncho/on_removed(mob/living/user, obj/item/clothing/C) - if(!has_suit) return + if(!has_suit) + return var/obj/item/clothing/suit/storage/marine/S = has_suit S.armor_overlays -= "poncho" . = ..() From dc9a60f8f0fafe04f81349383b28fe835d54c61a Mon Sep 17 00:00:00 2001 From: AmoryBlaine <32080743+AmoryBlaine@users.noreply.github.com> Date: Fri, 19 Jul 2024 19:55:10 -0400 Subject: [PATCH 8/8] Update code/modules/clothing/under/ties.dm gotcha Co-authored-by: Doubleumc --- code/modules/clothing/under/ties.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index d60c06dc4f..026f62ca57 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -427,7 +427,7 @@ /obj/item/clothing/accessory/poncho/on_removed(mob/living/user, obj/item/clothing/C) if(!has_suit) return - var/obj/item/clothing/suit/storage/marine/S = has_suit + var/obj/item/clothing/suit/storage/marine/suit = has_suit S.armor_overlays -= "poncho" . = ..()