From bdd18980fd46f42d435226bdad12cb948013d8c7 Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Tue, 4 Jun 2024 22:32:26 -0700 Subject: [PATCH] Only show playable game modes when selecting solo play --- ui/t6/mapslist.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ui/t6/mapslist.lua b/ui/t6/mapslist.lua index a3ca6866..cf67dc05 100644 --- a/ui/t6/mapslist.lua +++ b/ui/t6/mapslist.lua @@ -133,7 +133,19 @@ function LUI.createMenu.SelectGameModeListZM(controller) listBox:setLeftRight(true, false, 0, 250) listBox:setTopBottom(true, false, 75, 75 + 530) listBox:addScrollBar(530 + (8 * 12), 2) - listBox:setTotalItems(#CoD.MapsList.GameModes, index) + + if UIExpression.DvarBool(nil, "party_solo") == 1 then + local numGameModes = 2 + + if index > numGameModes then + index = 1 + end + + listBox:setTotalItems(numGameModes, index) + else + listBox:setTotalItems(#CoD.MapsList.GameModes, index) + end + self:addElement(listBox) self.listBox = listBox