Mafia now starts without admin intervention (#79348)

## About The Pull Request

Mafia should now start without the need of admin intervention.
I made a unit test that should always have a PDA and a ghost spawning in
a game of Mafia and having it run through basic setup to confirm they
both successfully sign up and the game starts.

I had to change a lot of things in order to get this working, such as
giving unique ckeys to mock clients, fixing harddels in Mafia, and
plenty of minor fixes. This is the first time any of this code is put in
CI, so a lot of uncaught errors are now showing their faces.

Because loading maps mid-round runtimes due to smoothing, I have mafia
their own unit test-only map that doesn't use smoothing.

I also split the mafia ui code into its own file, and moved a single
helper that was sitting around in mafia's file into a helpers file.

I also added some comments to explain why certain things are the way
they are, because I wrote some undocumented code previously and forgot a
few things, leading to self-inflicted wasted time.

## Why It's Good For The Game

^

## Changelog

🆑
fix: Mafia games can now start properly.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
John Willard
2023-11-04 21:26:24 -04:00
committed by GitHub
parent 07bfd6c655
commit 88bb3afcce
24 changed files with 1446 additions and 701 deletions

View File

@@ -8,6 +8,9 @@
var/clusterCheckFlags = CLUSTER_CHECK_SAME_ATOMS
var/allowAtomsOnSpace = FALSE
/datum/map_generator_module/Destroy(force, ...)
mother = null
return ..()
//Syncs the module up with its mother
/datum/map_generator_module/proc/sync(datum/map_generator/mum)