1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 14:07:25 +08:00

On the mappool screen the auto-pick map logic on map change still assumed 1 ban per team. Now it listens to the BanCount value from the round

This commit is contained in:
Olle Kelderman 2024-06-09 21:42:37 +02:00
parent be48377c4c
commit 642095b07b

View File

@ -123,7 +123,12 @@ namespace osu.Game.Tournament.Screens.MapPool
private void beatmapChanged(ValueChangedEvent<TournamentBeatmap?> beatmap)
{
if (CurrentMatch.Value == null || CurrentMatch.Value.PicksBans.Count(p => p.Type == ChoiceType.Ban) < 2)
if (CurrentMatch.Value?.Round.Value == null)
return;
int totalBansRequired = CurrentMatch.Value.Round.Value.BanCount.Value * 2;
if (CurrentMatch.Value.PicksBans.Count(p => p.Type == ChoiceType.Ban) < totalBansRequired)
return;
// if bans have already been placed, beatmap changes result in a selection being made automatically