11-27-2020, 04:45 PM
Finally, after two months and more, this project has been finished! Tails were also implemented as part of this PR. I'll quote the creator on the changes and let the words speak for themselves:
In laypeople's terms:
This is a somewhat comprehensive change, so feedback is appreciated! Don't be afraid to make a thread or mention issues on #imcoder!
Quote:I'm trying to rework much of the way appearance information is stored, how human bodies are constructed for display, and expanding the role of the appearanceholder, all so I can cut off my lizard tail and eat it.
The goal is to allow non-humans with non-human.dmi icons be assembled through the update_body thing, and make severed body parts retain their display information even when reattached.
Some design notes:So far, much of it works. Limbs retain their colors across reattachments, certain mutants can be dismembered just like humans, heads are properly updated across setting and resetting of mutantraces.
- If display information can be stored and calculated somewhere other than update_body, it should.
- Especially relevant for things like limbs and heads, where the data for their display is stored in those body parts and simply retrieved when the body's appearance is updated. This'll allow severed human limbs to retain their skin color both on the ground and on other people.
- The appearance holder should hold all customization-related information, such as the body's icon (and state if they're rendered with a static icon), the head's icon, and any appearance flags the body has.
- Use a couple sets of bitflags to tell the body constructor and limbs what set of vals to use from the appearance holder, whether it should be colorized or draw from the "special" set of customization vars, for instance.
- Heads need to be able to change their appearance almost entirely, both on the body and on the ground, since I can't figure out how to swap out someone's head without killing them or murdering their client.
- And store all the body builder accessible customization info (hair, eyes, etc) there. Will require barbery to alter the head's vars, not the appearance holder... probably.
- Added in limbs and images for most of the mutant races.
Should work just fine!
In laypeople's terms:
Quote:(u)Superlagg:
(*)Dismembered mutants now show that they are missing limbs.
(*)Mutant limbs now show up properly when attached to someone else.
(*)Tails can now be cut off and reattached to just about anyone.
This is a somewhat comprehensive change, so feedback is appreciated! Don't be afraid to make a thread or mention issues on #imcoder!