Files
Bubberstation/code/modules/mob_spawn
Paxilmaniac 8a1cc5ccca Fixes ghost roles trying to spawn people when there /should/ be zero uses left (#73224)
## About The Pull Request

By means of making a particularly popular ghost role (do NOT put
catgirls on icebox bro you don't know the consequences) I have
discovered a strange bug where despite any of the checks that are in
place, it will still attempt to spawn more people than the role should
allow. I've found the likely caused to be that a lot of people are
clicking the role then clicking spawn at once, and the spawner simply
does not have time to tell everyone "wait no you can't do that" before
it deletes itself from running out of uses.

The solution? Even easier than the reservation thing: Subtract uses
**BEFORE** spawning the mob, as spawning the mob can take some time,
then if it fails to spawn somehow we can refund the uses.

## Why It's Good For The Game

Ghost roles spawning in the nullspace spawn room every now and then is a
bad thing I think.

## Changelog
🆑
fix: Ghost role spawners will now no longer try and spawn people when
they /should/ have been out of uses but due to a bug were not
/🆑
2023-02-10 09:54:49 -08:00
..