Files
Bubberstation/code/modules/surgery
Jacquerel 3536d0df62 Arms memory management (#75378)
## About The Pull Request

Fixes #75251 
Fixes #75376
Fixes #75377 
Fixes #75394

uh... I think?

Here's the thing, is that golem arms are not actually particularly
different to other kinds of arms, so I have been struggling to find a
reason that this test is flaking _only_ for golem arms, in relation to a
list that I didn't touch.
My best guess is that the reason they're sometimes sticking to the
"available hands" list is related to golems not being dismemberable and
thereby skipping the code path which would remove a removed arm from the
hand list, which sounds plausible except that nightmares are also
NODISMEMBER and don't have the same problem.

Regardless, I made some boilerplate for when you give someone an arm
which registers to the destruction and dismember signals and removes
them from your available hand list when either of those things happen
under any circumstances, whereas before it was reliant on passing
through a much more specific pipeline.

Notably the text which set this also remarked `We only want to do this
if the limb being removed is the active hand part.` which certainly does
not sound true to me (although it does for the other line scoped inside
that if check) and now also isn't, but this didn't seem to be widely
affecting arms in general anyway.

I couldn't replicate the test failing after making these changes but as
a flaky result that doesn't really tell us very much because to some
extent it might just have been down to luck.

## Why It's Good For The Game

Memory management, hopefully will stop randomly triggering CI failures.

## Changelog

Not player facing
2023-05-12 21:01:09 -06:00
..
2023-05-12 21:01:09 -06:00