Skip to content

Commit

Permalink
[MIRROR] [MDB IGNORE] Refactors Suicide Verb + Basic Mobs (actually a…
Browse files Browse the repository at this point in the history
…ll (most) living mobs) Can Now Suicide (#4258)

Original PR: tgstation/tgstation#72919
-----
## About The Pull Request

On the tin. There was a lot of needless copy-paste and a lot of
single-letter vars and weird indentation and... well just all of it was
at least eight years old. So, I decided to "abstract" as much as I could
of it out instead of piling onto the big copypaste clusterfuck for
implementing basic mob suicide.
## Why It's Good For The Game

Fixes #72903

Having more procs that can be easily repeatably called to the same
results is much better than having to transplant the same exact three
lines everywhere. It's also a good first step to further in-depth
behavior by allowing sub-type overrides of certain procs (which is quite
nice). Just feels more extensible overall for the next guy who wants to
add funny suicide behavior whenever they might come around.

There's probably a few better ways to do what I did, but I wrote code
comments explaining why I did what I did. I think there's a few ways to
make it more agnostic, but I think that'll be another can of worms that
will bloat out an already quite large PR. Let's just get the framework
set.

(this refactor should also make it quite easy to unit test suicide
actions 👀)
## Changelog
🆑
fix: All Mobs (including Basic mobs) are now able to suicide. (warning:
some exclusions remain)
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 30, 2023
1 parent 2bc4e35 commit 059554a
Show file tree
Hide file tree
Showing 3 changed files with 227 additions and 190 deletions.
Loading

0 comments on commit 059554a

Please sign in to comment.