diff --git a/tools/deck/cb/boot.mjs b/tools/deck/cb/boot.mjs index e3627e7..7e8dd7c 100644 --- a/tools/deck/cb/boot.mjs +++ b/tools/deck/cb/boot.mjs @@ -10,7 +10,18 @@ ${luaCharsTable()} ${luaSoulShopTable(SOUL_UNLOCKS)} self.SoulUnlocks = {} self.SoulPoints = self.SoulPoints or 0 -self:ShowMainMenu() +local uiTries = 0 +local uiInit = 0 +uiInit = _TimerService:SetTimerRepeat(function() + uiTries = uiTries + 1 + if _EntityService:GetEntityByPath("/ui/DeckUIGroup") ~= nil then + self:ActivateUIGroups() + self:ShowMainMenu() + _TimerService:ClearTimer(uiInit) + elseif uiTries > 80 then + _TimerService:ClearTimer(uiInit) + end +end, 0.1) local lp = _UserService.LocalPlayer if lp ~= nil then self:ReqLoadAscension(lp.PlayerComponent.UserId) diff --git a/tools/deck/cb/charselect.mjs b/tools/deck/cb/charselect.mjs index da07c2c..25ad80c 100644 --- a/tools/deck/cb/charselect.mjs +++ b/tools/deck/cb/charselect.mjs @@ -66,5 +66,5 @@ if e ~= nil then end`, [ { Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'path' }, { Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'enabled' }, - ]), + ], 2), ]; diff --git a/tools/deck/cb/state.mjs b/tools/deck/cb/state.mjs index 7e3c865..c85bddc 100644 --- a/tools/deck/cb/state.mjs +++ b/tools/deck/cb/state.mjs @@ -21,6 +21,14 @@ self:SetEntityEnabled("/ui/DeckUIGroup/DeckAllHud", false) self:SetEntityEnabled("/ui/LobbyUIGroup/LobbyHud", false) self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", false) self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", false)`), + method('ActivateUIGroups', `local function grp(n) + local g = _EntityService:GetEntityByPath("/ui/" .. n) + if g ~= nil then g:SetEnable(true) end +end +grp("SelectUIGroup") +grp("LobbyUIGroup") +grp("RunUIGroup") +grp("DeckUIGroup")`, [], 2), method('ShowState', `self:HideGameHud() self:SetEntityEnabled("/ui/DefaultGroup/MainMenu", state == "menu") self:SetEntityEnabled("/ui/SelectUIGroup/CharacterSelectHud", state == "charselect")