[MIRROR] Wintercoats can now be zipped and unzipped through alt-click and separates the hood sprites from the jacket sprites [MDB IGNORE] (#20718)

* Wintercoats can now be zipped and unzipped through alt-click and separates the hood sprites from the jacket sprites (#74886)

## About The Pull Request
The title says it all, really.

~~Initially, I was only going to do it for all wintercoats, but then I
figured I might as well bring it down to all of `/hooded`, just so other
suits could benefit from it, since that behavior came from there anyway.
Does that mean that it does nothing for some of them? Yes, it does. Does
that justify having another variable to tell whether or not that should
be possible? In my humble opinion, not really, but I'm not against it if
it's requested.~~

~~That functionality was intentionally removed from the Void Cloak, as
there would be balance implications (since bringing up the hood makes
the whole cloak invisible, which you could skirt by just "zipping" it,
which also makes it invisible.~~

~~The sprites were already there, so this change was very simple to do.
Simply unties the zipped up look from the fact that the hood is up.
However, toggling the hood forces the zipping/unzipping, just so there's
no balance implications involved. It's just simpler that way.~~

So, I ended up going back and changing the sprites so that the hoods
would no longer be baked into the jacket's sprites, so that they could
be done as overlays instead, which ended up solving my problem with
hoods not being there on zipped-up versions.

For now, it's been made on winter coats only, but it shouldn't be that
difficult to bring it back down to the `/hooded` level. I just didn't
want to bother touching up the sprites down there, as it already took me
like 2-3 hours touching up the sprites of the winter coats alone.

I also took the decision to make it so EVA winter coats used the regular
winter coat's sprites, because they had special ones that just looked
like worse versions of the original, without anything special going on
for them. It was just a straight downgrade compared to the base sprite,
in my opinion.

There's still issues with the custom winter coat, in that the hood isn't
made into an overlay for it yet (and that'll require an extra bit of
logic to make it work, too), but it was already an issue before, the
hood is always present on the current version of the custom winter coat.

There's still a handful (sadly, most) of the winter coats that don't
properly reflect on their obj sprites when they're opened versus when
they're closed, but that's due to an initial spriter oversight, and not
to my doing. The open versions were just left as closed on many of them,
and I simply don't have the patience nor the appropriate skills to edit
that many coats that way.

## Why It's Good For The Game
Now you can be stylish with or without the hoodie!

![image](https://user-images.githubusercontent.com/58045821/233544697-cc821c3a-d965-4d96-af44-c44ff866496f.png)

![image](https://user-images.githubusercontent.com/58045821/233544711-da956b6b-44c4-4903-a34f-4d2890abc781.png)

![image](https://user-images.githubusercontent.com/58045821/233544717-b5221b04-0e6d-4931-83d0-d56fdac60ec3.png)

According to ChatGPT, with one small tweak (thanks Opera GX for the
suggestion):

> Zipped and unzipped through alt-click, winter coats can now be. Hmm,
stylishly warm, you shall be. Feel like a Spaceman, you will. Use the
Force, to zip and unzip, you must. Look cool, you will. Yes, hmmm.

## Changelog

🆑 GoldenAlpharex, ChatGPT for the first changelog entry (slightly
edited)
qol: Zipped and unzipped through alt-click, winter coats can now be.
Hmm, stylishly warm, you shall be. Feel like a Spaceman, you will. Use
the Force, to zip and unzip, you must. Look cool, you will. Yes, hmmm.
image: Winter coats no longer have their hood baked into their jacket's
sprite, both in item form and when worn.
fix: Updated the Icebox EVA winter coats (the Endotherm winter coats) to
use the same sprites as the regular winter coats.
/🆑

---------

Co-authored-by: san7890 <the@ san7890.com>

* Wintercoats can now be zipped and unzipped through alt-click and separates the hood sprites from the jacket sprites

* update modular wintercoat.dmi

* forgot

---------

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: ghost sheep <sheepwiththemask@gmail.com>
This commit is contained in:
SkyratBot
2023-04-24 17:20:33 +02:00
committed by GitHub
co-authored by san7890 GoldenAlpharex ghost sheep
parent f9b47206ad
commit 33961776ce
7 changed files with 46 additions and 9 deletions
+8 -1
View File
@@ -8,12 +8,15 @@
var/alternative_mode = FALSE
///Whether the hood is flipped up
var/hood_up = FALSE
/// Are we zipped? Mostly relevant for wintercoats, leaving this here to simplify logic and so someone else can extend it if they ever wish to.
var/zipped = FALSE
/obj/item/clothing/suit/hooded/Initialize(mapload)
. = ..()
if(!alternative_mode)
MakeHood()
/obj/item/clothing/suit/hooded/Destroy()
. = ..()
QDEL_NULL(hood)
@@ -42,7 +45,9 @@
ToggleHood()
/obj/item/clothing/suit/hooded/proc/RemoveHood()
src.icon_state = "[initial(icon_state)]"
icon_state = "[initial(icon_state)]"
worn_icon_state = icon_state
zipped = FALSE
hood_up = FALSE
if(hood)
@@ -82,6 +87,8 @@
return
hood_up = TRUE
icon_state = "[initial(icon_state)]_t"
worn_icon_state = icon_state
zipped = TRUE // Just to maintain the same behavior, and so we avoid any bugs that otherwise relied on this behavior of zipping the jacket when bringing up the hood
H.update_worn_oversuit()
H.update_mob_action_buttons()
else
+38 -2
View File
@@ -11,6 +11,8 @@
min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT
allowed = list()
armor_type = /datum/armor/hooded_wintercoat
/// The mutable_appearance of the associated hood, when it's down. Can be null when the hood is up.
var/mutable_appearance/hood_overlay
/datum/armor/hooded_wintercoat
bio = 10
@@ -29,6 +31,42 @@
/obj/item/toy,
)
generate_hood_overlay()
/obj/item/clothing/suit/hooded/wintercoat/examine(mob/user)
. = ..()
. += span_notice("<b>Alt-click</b> to [zipped ? "un" : ""]zip.")
/obj/item/clothing/suit/hooded/wintercoat/AltClick(mob/user)
. = ..()
if (. == FALSE) // Direct check for FALSE, because that's the specific case we want to propagate, not just null.
return FALSE
zipped = !zipped
worn_icon_state = "[initial(icon_state)][zipped ? "_t" : ""]"
balloon_alert(user, "[zipped ? "" : "un"]zipped")
if(ishuman(loc))
var/mob/living/carbon/human/wearer = loc
wearer.update_worn_oversuit()
/// Helper proc to generate the `hood_overlay` associated to the wintercoat.
/obj/item/clothing/suit/hooded/wintercoat/proc/generate_hood_overlay()
hood_overlay = mutable_appearance(initial(worn_icon), "[initial(icon_state)]_hood", -SUIT_LAYER)
/obj/item/clothing/suit/hooded/wintercoat/worn_overlays(mutable_appearance/standing, isinhands)
. = ..()
if(!isinhands && !hood_up)
. += hood_overlay
/obj/item/clothing/head/hooded/winterhood
name = "winter hood"
desc = "A cozy winter hood attached to a heavy winter jacket."
@@ -49,7 +87,6 @@
/obj/item/clothing/suit/hooded/wintercoat/eva
name = "\proper Endotherm winter coat"
desc = "A thickly padded winter coat to keep the wearer well insulated no matter the circumstances. It has a harness for a larger oxygen tank attached to the back."
icon_state = "coateva"
w_class = WEIGHT_CLASS_BULKY
slowdown = 0.75
armor_type = /datum/armor/wintercoat_eva
@@ -77,7 +114,6 @@
/obj/item/clothing/head/hooded/winterhood/eva
name = "\proper Endotherm winter hood"
desc = "A thickly padded hood attached to an even thicker coat."
icon_state = "hood_eva"
armor_type = /datum/armor/winterhood_eva
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
max_heat_protection_temperature = SPACE_HELM_MAX_TEMP_PROTECT