Skip to content

Commit

Permalink
Properly stop game if it can't start due to too few players
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
skizzerz committed Mar 12, 2024
1 parent 1920536 commit b0f2b53
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pregame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b0f2b53

Please sign in to comment.