From b0f2b53e6d4c3da895b01a4c386f99c84aeea991 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Tue, 12 Mar 2024 08:11:09 -0700 Subject: [PATCH] Properly stop game if it can't start due to too few players Before it would be stuck in a "limbo" where it's still in join phase, but with a real GameState instead of a PregameState which causes various issues, such as all subsequent joins raising the player count to 1 and not actually succeeding. --- src/pregame.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pregame.py b/src/pregame.py index 81b8f608..f4c641fb 100644 --- a/src/pregame.py +++ b/src/pregame.py @@ -260,6 +260,7 @@ def _isvalid(mode, allow_vote_only): del defroles[srole] if not defroles: wrapper.send(messages["no_settings_defined"].format(wrapper.source, lv)) + stop_game(ingame_state, abort=True, log=False) return for role, num in defroles.items(): # if an event defined this role, use that number. Otherwise use the number from ROLE_GUIDE