Merge pull request #510 from WantedDV/ranked

Allow access to online menus with mod loaded
This commit is contained in:
Maurice Heumann 2023-04-24 18:56:01 +02:00 committed by GitHub
commit a5075e150e
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1 @@
require("online_mods_loaded")

View File

@ -0,0 +1,23 @@
if Engine.GetCurrentMap() ~= "core_frontend" then
return
end
function ShouldUnloadMod(arg0)
return false
end
-- Load usermaps mod if custom map selected
local mustLoadUsermaps = function(element, controller)
if CoD.perController[controller].mapCategory == CoD.CONTENT_MODS_INDEX then
if not Engine.IsUsingMods() then
LuaUtils.Mods_LoadMod("usermaps") -- LuaUtils.Mods_LoadMod(element.loadModName)
CoD.OverlayUtility.ShowToast("DefaultState", Engine.Localize("MENU_MODS_CAPS"), Engine.Localize("PLATFORM_MODS_LOADED") .. " " .. element.mapName)
end
end
end
function MapSelected(element, controller)
SetMap(controller, element.mapName, false)
mustLoadUsermaps(element, controller)
end