Commit Graph

3 Commits

Author SHA1 Message Date
MrMelbert
47dc38fee2 Let's you talk through action figures, plushies, and toy mechs with .l and .r. Also a big clean up of say because its support for non-mobs was lackluster. (#81848) 2024-03-07 09:21:12 -07:00
san7890
3415828c6b Refactors Revenants into Basic Mobs (#78782)
## About The Pull Request

I felt bad about taking all the "easy" ones, so let's change it up with
a decently difficult one. Revenants are now basic mobs! This alone
doesn't change much of anything because it pretty much overrode much of
simple_animal code. However we do a few new things.

* Multiple code improvements! No more weird proc names that aren't
`snake_case`, cleaner variable names, more dmdoccing, etc.
* Files are now reorganized, Rather than a 800-line dogshit monofile,
we're all nice now
* Multiple logic improvements, like early returns to make stuff more
readable and the like. many `isnull()` yes
* Instead of abusing key ownership logic, we use `mind.transfer_to()`
instead for much cleaner behavior when we need to change stuff
* Instead of iterating over the entire list of mobs to find dead mobs,
we use a new `revenant_relay()` system that automatically handles
broadcasting revenant messages to all observers and fellow revenants
(like `blob_talk()`)
* Instead of having a weird invisible "corpse", we move the revenant
inside the actual ectoplasm when they die. This drastically simplifies a
lot of wacky code that was completely useless since we still had the mob
to work with, but now it's a lot cleaner when it comes down to it.
* Some more hooks into stuff like `Life()` that might be useful for
other people in the same way this is.
* Less <span> crap, more macros, wahoo
* Uses an `examine_block()` for when we relay instructions to new
revenants. also cache those instructions to save time in the long run
* Revenants being stunned, inhibited, and revealed are now managed by
status effects rather than being chicanery on `Life()`
* Everything should now just in general be a lot nicer to work with.
This list is not exhaustive but a lot of the junk 7-year-old code has
been gutted and replaced with the modern standards.

There are stuff that I explicitly didn't touch and will not be touching
in this PR as it's already rather large.
* Revenant actions. I touched some proc names but I didn't alter the key
ways they work.
* Revenant movement. That's another can of worms.
* Revenant event code. I just made it use the transfer to system to make
a closed loop and that's about it.
* Revenant AI. They don't have any, it's an event/admin spawn. I'm not
adding AI here.
## Why It's Good For The Game

Revenants are more extensible now rather than being a real big
clusterfuck of bullshit, should be much easier to tweak stuff here and
there or logically follow how the code for this fella should go. The
number of weird revenant bugs should go down since we do stuff more
simply- but there could be some sleeper bugs that can bite us.
## Changelog
🆑
refactor: Revenants, the mob that's split between planes of Life and
Death, have been refactored into a basic mob. While this alone shouldn't
touch behavior, a lot of the backend code has been gutted and refactored
to try and furnish a better antagonist experience. This might mean that
some weird stuff can come up and around, report something if it's
utterly broken.
code: In order to better facilitate some code, you do not ghost outside
of a revenant on death, you simply get transferred into the ectoplasm.
You should still be able to speak with your ghost friends on how hard
you got wrecked or if you'll be able to resurrect though.
code: The timing on revenant stuff such as being revealed, stunned, and
inhibited (by holy weapons) should be tweaked a bit to allow better
management. This should mean that getting unstunned and such should be a
bit more precise now.
qol: Revenant instructions are now relayed in a neat little examine
block.
/🆑
2023-10-09 23:15:20 +01:00
Jacquerel
517d33e6f0 Basic blob mobs (#78520)
## About The Pull Request

I remembered today that blob code is ass, especially blob spores.
There's still a lot to improve but I cleaned up _some_ of it by
converting these mobs.
Now they use a newer framework and more signal handling as compared to
circular references.

I _expect_ the behaviour here to largely be the same as it was or
similar. I haven't added anything fancy or new.

This is a reasonably big PR but at least all of the files are small?
Everything here touched every other thing enough that it didnt make
sense to split up sorry.

Other things I did in code:
- Experimented with replacing the `mob/blob` subtype with a component.
Don't know if this is genius or stupid.
- AI subtree which just walks somewhere. We've used this behaviour a lot
but never given it its own subtree.
- Blob Spores and Zombies are two different mobs now instead of being
one mob which just changes every single one of its properties.
- Made a few living defence procs call super, because the only thing
super does was send a signal and we weren't doing that for no reason.
Also added a couple extra signals for intercepts we did not have.

## Changelog

🆑
fix: Blob spores will respond to rallies more reliably (it won't runtime
every time they try and pathfind).
fix: Blobbernaut pain animation overlays should align with the direction
the mob is facing instead of always facing South
refactor: Blob spores, zombies, and blobbernauts now all use the basic
mob framework. They should work the same, but please report any issues.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
2023-09-26 15:28:26 -06:00