From c176bfb45764d195819a053538ea433941f1561e Mon Sep 17 00:00:00 2001 From: L-e-x-o-n <44340857+L-e-x-o-n@users.noreply.github.com> Date: Sun, 9 Jun 2024 20:42:02 +0200 Subject: [PATCH] mix format --- lib/teiserver/battle/libs/match_lib.ex | 7 +++++-- lib/teiserver/game/servers/balancer_server.ex | 3 ++- lib/teiserver/libs/teiserver_configs.ex | 4 +--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/teiserver/battle/libs/match_lib.ex b/lib/teiserver/battle/libs/match_lib.ex index ff1b2bc23..540a154e5 100644 --- a/lib/teiserver/battle/libs/match_lib.ex +++ b/lib/teiserver/battle/libs/match_lib.ex @@ -81,9 +81,12 @@ defmodule Teiserver.Battle.MatchLib do if teams != %{} do team_count = teams |> count - team_size = teams - |> Enum.map(fn {_, t} -> (t |> count) end) + + team_size = + teams + |> Enum.map(fn {_, t} -> t |> count end) |> Enum.max(fn -> 0 end) + game_type = game_type(team_size, team_count, bots) match = %{ diff --git a/lib/teiserver/game/servers/balancer_server.ex b/lib/teiserver/game/servers/balancer_server.ex index a632b7801..c35913e15 100644 --- a/lib/teiserver/game/servers/balancer_server.ex +++ b/lib/teiserver/game/servers/balancer_server.ex @@ -166,7 +166,8 @@ defmodule Teiserver.Game.BalancerServer do players |> Enum.group_by(fn c -> c.team_number end) - team_size = teams + team_size = + teams |> Enum.map(fn {_, t} -> Enum.count(t) end) |> Enum.max(fn -> 0 end) diff --git a/lib/teiserver/libs/teiserver_configs.ex b/lib/teiserver/libs/teiserver_configs.ex index 6baa6eba4..27024b286 100644 --- a/lib/teiserver/libs/teiserver_configs.ex +++ b/lib/teiserver/libs/teiserver_configs.ex @@ -412,14 +412,12 @@ defmodule Teiserver.TeiserverConfigs do default: 50 }) - add_site_config_type(%{ key: "lobby.Small team game limit", section: "Lobbies", type: "integer", permissions: ["Admin"], - description: - "Maximum team size to be considered as a small team game", + description: "Maximum team size to be considered as a small team game", default: 5 }) end