Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Lizard spines no longer "float" on characters without lizard tails. (#80456) #1668

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Nova: NovaSector/NovaSector#574

ORIGINAL PR: tgstation/tgstation#80456

Fixes #69658.

As the title says, this PR resolves the issue where lizard spines always have a "tail" portion even if there isn't actually a tail for them to be on. This has been done via two steps:

  1. Spine icons have been separated into "spine" and "tailspine" icon states, for those on the back and those on the tail, respectively.
  2. Tailspines now have their own, separate bodypart overlay, which is added by the tail if the owner has spines. This bodypart overlay appears if both a tail and spines are present, and is removed if this ceases to be true.

image

This image displays the results of this change. From left to right, it shows:

  1. A lizard with both a tail and spines.
  2. A lizard with spines but not a tail (specifically, one where the tail was removed).
  3. A lizard with a tail but not spines (specifically, one where the spines were removed).
  4. A lizard with the "short" tail style, which does not fit the shape of tail spines and thus doesn't have them.
  5. A lizard with a felinid tail surgically attached, which also does not receiver tail spines.

Which tails will successfully render tail spines is now handled by a "spine_key" define in the tail sprite datum. Currently, such a key only exists for the standard lizard tail shape, but should anyone wish to sprite spines for other sorts of tails, it is now a simple matter to do so.

Relatedly, handling for tail spines has been moved to the base tail object, rather than lizard tails in particular. This functionally changes nothing, but may make life easier for downstreams that want to add spines to tails that are not explicitly lizard tails.

Finally, this PR also fixes a bug introduced in #79687, which made bodypart overlays not update at the right time when external organs are inserted or removed. Specifically, bodyparts were redrawn before the overlays were added or removed, meaning they would not update until something else forced a redraw. This is no longer the case.

"Floating" lizard spines are incredibly ugly visually, and a major obstacle to adding lizard tails that are not of the "standard" shape. In addition to cases where a lizard loses their tail mid-round, this also allows tailless or short-tailed lizards to actually use one of lizards' main customization options without looking like a total buffoon.

The extensibility, as stated before, may be nice for downstreams that wish to place spines on more tails, and may even be useful here if someone wishes to sprite spines for the "short" tail style.

Also makes the code nicer, as the tail/spine wagging interaction previously relied on a very ugly two-way link between the two organs that has been rendered unnecessary by the tail handling everything.

Finally, it's good to fix a bug that completely destroyed the usability of feature manipulation surgery.
🆑 lizardqueenlexi
fix: Feature manipulation surgery will now properly update the patient's appearance.
refactor: The tail portion of lizard spines will no longer draw on people who do not have a tail.
/:cl:

… lizard tails. (#80456) (#574)

* Lizard spines no longer "float" on characters without lizard tails. (#80456)

Fixes #69658.

As the title says, this PR resolves the issue where lizard spines always
have a "tail" portion even if there isn't actually a tail for them to be
on. This has been done via two steps:

1. Spine icons have been separated into "spine" and "tailspine" icon
states, for those on the back and those on the tail, respectively.
2. Tailspines now have their own, separate bodypart overlay, which is
added by the tail if the owner has spines. This bodypart overlay appears
if both a tail and spines are present, and is removed if this ceases to
be true.

![image](https://github.com/tgstation/tgstation/assets/105025397/6f62340e-3ca8-48b5-97e4-5f80712abbcd)

This image displays the results of this change. From left to right, it
shows:

1. A lizard with both a tail and spines.
2. A lizard with spines but not a tail (specifically, one where the tail
was removed).
3. A lizard with a tail but not spines (specifically, one where the
spines were removed).
4. A lizard with the "short" tail style, which does not fit the shape of
tail spines and thus doesn't have them.
5. A lizard with a felinid tail surgically attached, which also does not
receiver tail spines.

Which tails will successfully render tail spines is now handled by a
"spine_key" define in the tail sprite datum. Currently, such a key only
exists for the standard lizard tail shape, but should anyone wish to
sprite spines for other sorts of tails, it is now a simple matter to do
so.

Relatedly, handling for tail spines has been moved to the base tail
object, rather than lizard tails in particular. This functionally
changes nothing, but may make life easier for downstreams that want to
add spines to tails that are not explicitly _lizard_ tails.

Finally, this PR also fixes a bug introduced in #79687, which made
bodypart overlays not update at the right time when external organs are
inserted or removed. Specifically, bodyparts were redrawn _before_ the
overlays were added or removed, meaning they would not update until
something else forced a redraw. This is no longer the case.

"Floating" lizard spines are incredibly ugly visually, and a major
obstacle to adding lizard tails that are not of the "standard" shape. In
addition to cases where a lizard loses their tail mid-round, this also
allows tailless or short-tailed lizards to actually use one of lizards'
main customization options without looking like a total buffoon.

The extensibility, as stated before, may be nice for downstreams that
wish to place spines on more tails, and may even be useful here if
someone wishes to sprite spines for the "short" tail style.

Also makes the code nicer, as the tail/spine wagging interaction
previously relied on a very ugly two-way link between the two organs
that has been rendered unnecessary by the tail handling everything.

Finally, it's good to fix a bug that completely destroyed the usability
of feature manipulation surgery.
:cl:
fix: Feature manipulation surgery will now properly update the patient's
appearance.
refactor: The tail portion of lizard spines will no longer draw on
people who do not have a tail.
/:cl:

* Modular adjustments

* Modular adjustments 2

* Modular updates 3

* Modular updates 4

---------

Co-authored-by: lizardqueenlexi <[email protected]>
@Iajret Iajret merged commit 24fa218 into master Jan 24, 2024
23 checks passed
@Iajret Iajret deleted the upstream-mirror-574 branch January 24, 2024 17:41
AnywayFarus added a commit that referenced this pull request Jan 24, 2024
Iajret pushed a commit that referenced this pull request Mar 27, 2024
* Fixes modular computer boot-up

* Prepare for merge master

* restore mirror

---------

Co-authored-by: lessthanthree <[email protected]>
Co-authored-by: SomeRandomOwl <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants