Height and minor bodypart overlay refactor (#96570)

## About The Pull Request

### Main changes

Height is no longer applied in `apply_overlay`

There is now a proc titled `apply_height()` which is passed an
appearance and a body area, and handles either applying a filter or
adjusting the offset of the appearance up or down

`apply_height` is now called directly when applying item appearances
(ie, `update_worn_x`)
`apply_height` is also called directly in `get_limb_icon` (as height is
included in limb render keys).

### Other changes

Bodypart overlays were cleaned up a bit. You can now apply and remove
bodypart overlays directly with just the typepath, which is a bit more
convenient.

Bodypart textures were split into a separate type. Previously, textures
relied on insertion order to be "correctly" added (any bodypart overlays
added later would not be modified by the bodypart texture). Now

Fixed a bug with cybernetics while I was there. They reskin by changing
DMI so they needed to have their DMI included in their render keys.

## Why It's Good For The Game

This allows us to be more specific and less wasteful about applying
height filters and whatnot - We can now specify whether certain overlays
are offset or given a filter.

For example: In the past, horns and frills were filtered solely because
they were attached to the head and the head was filtered.
We couldn't independently say "Offsets the horns and frills, they don't
need filters".
But now, not only are we able to say "rather than filter the head, just
apply an offset", we can also say "horns and frills should be offset
rather than filtered".

TL;DR fixes the issue where horns or cat ears are cut off by height
filters, yippee.

## Changelog

🆑 Melbert
fix: Cybernetic reskinning should break less. 
fix: Horns and cat ears should be cut off less by height.
fix: Bodypart textures should apply more consistently. 
refactor: Mutant parts like moth wings, lizard tails, cat eats, etc.
have been refactored a tiny bit, report any oddities.
refactor: Bodypart textures were refactored a tiny bit, report any
oddities.
refactor: Refactored the way height works, report anything weird looking
things involving that.
/🆑
This commit is contained in:
MrMelbert
2026-06-27 10:28:43 +02:00
committed by GitHub
parent a05270b364
commit 21ea64aec5
40 changed files with 371 additions and 309 deletions
@@ -271,7 +271,8 @@ GLOBAL_LIST_INIT(raptor_colors, init_raptor_colors())
// Raptors won't have the best of times keeping up tall humans or fatties up in the air
var/struggling = HAS_TRAIT(user, TRAIT_FAT) || user.mob_height > HUMAN_HEIGHT_SHORTEST
if (wings_open)
wings_underlay = user.apply_height_offsets(mutable_appearance(worn_icon, "raptor_purple_wings", -BODY_BEHIND_LAYER, user), UPPER_BODY)
wings_underlay = mutable_appearance(worn_icon, "raptor_purple_wings", -BODY_BEHIND_LAYER, user)
user.apply_height(wings_underlay, UPPER_BODY)
user.add_overlay(wings_underlay)
user.physiology.stun_mod *= 2
user.add_traits(list(TRAIT_MOVE_FLOATING, TRAIT_IGNORING_GRAVITY, TRAIT_NOGRAV_ALWAYS_DRIFT), REF(src))