From 2d2dd7d333d3caf88d9294482213cb439593d3df Mon Sep 17 00:00:00 2001 From: Zughy <4279489-marco_a@users.noreply.gitlab.com> Date: Wed, 20 Sep 2023 23:14:42 +0200 Subject: [PATCH] If min_players ingredient is greater than 2, change arenas' min_players with that value (and in case, also max_players if smaller) (closes #247) --- src/api/core.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/core.lua b/src/api/core.lua index 9023f9e..21b78b4 100644 --- a/src/api/core.lua +++ b/src/api/core.lua @@ -497,6 +497,8 @@ function arena_lib.create_arena(sender, mod, arena_name, min_players, max_player local arena = mod_ref.arenas[ID] arena.name = arena_name + arena.min_players = math.max(arena.min_players, mod_ref.min_players) + arena.max_players = math.max(arena.max_players, mod_ref.min_players) -- numero giocatorɜ if mod_ref.endless then