Files
Bubberstation/code/datums/components/hat_stabilizer.dm
Leland Kemble 8f8bfb22ef Allows head-equippable items that are not /obj/item/clothing to be attached to /datum/component/hat_stabilizer (#93345)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

the `/datum/component/hat_stabilizer` component, which is the thing on
the magnate MODsuit(and apparently on other spacesuits(and wigs)) that
allows you to attach an additional piece of headwear on top of the helm,
was `istype()`ed to only allowing `/obj/item/clothing`. This prevented
many non- `/clothing` items from being attached, despite being
equippable to the head, the only one of which I care about being
flowers.

This pr changes the `istype()` check to checking for the head slot flag,
and modifies surrounding logic to account for this. The only items I can
think of that are non-clothing and are equippable to the head are
various flowers and `mob_holder`s for various animals.

Also fixes an unrelated bug where updating the appearance of the holding
item would change the offset of any loose-hat holders over and over
again, causing it to move around over your head if you, for example,
toggled a MOD flashlight on and off repeatedly.

Also fixes an unrelated bug where the hat taken off would never be put
in your hands when it was seemingly intended to, due to always returning
the hat rather than `put_in_active_hand()` (unless the parent isn't
clothing, but there's no non-clothing items with the component attached)

## Why It's Good For The Game

I want to put flowers on my helmet, and I don't see any possible
negative ramifications.

## Changelog

🆑

qol: Flowers can now be attached to space helmets.
qol: Taking hats off of helmets will now put them in your hand.
fix: MOD flashlights won't move hats on them when toggling.

/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2025-10-11 00:16:35 +02:00

9.0 KiB