From 46f78c359b4fee43f04c087debadebb5d8bd42af Mon Sep 17 00:00:00 2001 From: kroIya Date: Sat, 21 Dec 2024 07:35:00 +0200 Subject: [PATCH 1/2] Default boxes with 1 team load as if 2 teams --- LuaMenu/widgets/gui_battle_room_window.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/LuaMenu/widgets/gui_battle_room_window.lua b/LuaMenu/widgets/gui_battle_room_window.lua index 61b0663f3..961594a90 100644 --- a/LuaMenu/widgets/gui_battle_room_window.lua +++ b/LuaMenu/widgets/gui_battle_room_window.lua @@ -250,10 +250,13 @@ local function SetupInfoButtonsPanel(leftInfo, rightInfo, battle, battleID, myUs if selected == "Default Boxes" then local function defaultBoxes() + Spring.Echo(battle.nbTeams.." here") if battleLobby.name == "singleplayer" then battleLobby:SelectMap(battle.mapName) - else + elseif battle.nbTeams and tonumber(battle.nbTeams) > 1 then battleLobby:SayBattle("!loadboxes") + else + battleLobby:SayBattle("!loadboxes \""..battle.mapName.."\" 2 0") end UpdateBoxes() end From 5335af387a0a5e7e0736843e80da218db9cb9144 Mon Sep 17 00:00:00 2001 From: Moose <124457076+AntlerForce@users.noreply.github.com> Date: Sun, 22 Dec 2024 16:45:43 -0700 Subject: [PATCH 2/2] Remove echo, add comment --- LuaMenu/widgets/gui_battle_room_window.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/LuaMenu/widgets/gui_battle_room_window.lua b/LuaMenu/widgets/gui_battle_room_window.lua index 961594a90..e16c77671 100644 --- a/LuaMenu/widgets/gui_battle_room_window.lua +++ b/LuaMenu/widgets/gui_battle_room_window.lua @@ -250,10 +250,9 @@ local function SetupInfoButtonsPanel(leftInfo, rightInfo, battle, battleID, myUs if selected == "Default Boxes" then local function defaultBoxes() - Spring.Echo(battle.nbTeams.." here") if battleLobby.name == "singleplayer" then battleLobby:SelectMap(battle.mapName) - elseif battle.nbTeams and tonumber(battle.nbTeams) > 1 then + elseif battle.nbTeams and tonumber(battle.nbTeams) > 1 then --Minimum 2 teams in multiplayer until PvE boxes are supported battleLobby:SayBattle("!loadboxes") else battleLobby:SayBattle("!loadboxes \""..battle.mapName.."\" 2 0")