From 9236fb9fb388fd7728a8e99f282cf0dfe83d1dd5 Mon Sep 17 00:00:00 2001 From: Marek Rusinowski Date: Sun, 12 Nov 2023 16:14:50 +0100 Subject: [PATCH] Fix handling of startboxes with 1 team in nextmap generator (#156) --- scripts/py/gen_nextmap_maplists.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/py/gen_nextmap_maplists.py b/scripts/py/gen_nextmap_maplists.py index c051bf3..c73137b 100644 --- a/scripts/py/gen_nextmap_maplists.py +++ b/scripts/py/gen_nextmap_maplists.py @@ -40,6 +40,10 @@ def get_data(input_file): for startboxes_info in map["startboxesSet"].values(): if "maxPlayersPerStartbox" in startboxes_info: team_count = len(startboxes_info["startboxes"]) + if team_count == 1: + # Let's ignore the case when there is only 1 team. Maybe it should be + # just illegal in the rowy, but for now, there are some maps like that. + continue max_players_per_startbox = startboxes_info["maxPlayersPerStartbox"] # add non-ffa maps to teamsize_dict