2023-04-11 16:00:22 -04:00
|
|
|
if Engine.GetCurrentMap() ~= "core_frontend" then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2023-04-12 18:31:46 -04:00
|
|
|
function ShouldUnloadMod(arg0)
|
2023-04-11 16:00:22 -04:00
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
2023-04-11 16:04:19 -04:00
|
|
|
-- Load usermaps mod if custom map selected
|
2023-04-12 18:31:46 -04:00
|
|
|
local mustLoadUsermaps = function(arg0, arg1)
|
2023-04-11 16:04:19 -04:00
|
|
|
if CoD.perController[arg1].mapCategory == CoD.CONTENT_MODS_INDEX then
|
|
|
|
if not Engine.IsUsingMods() then
|
2023-04-12 18:31:46 -04:00
|
|
|
LuaUtils.Mods_LoadMod("usermaps") -- LuaUtils.Mods_LoadMod(arg0.loadModName)
|
|
|
|
|
|
|
|
local MENU_MODS_CAPS = Engine.Localize("MENU_MODS_CAPS")
|
|
|
|
local PLATFORM_MODS_LOADED = Engine.Localize("PLATFORM_MODS_LOADED")
|
|
|
|
CoD.OverlayUtility.ShowToast("DefaultState", MENU_MODS_CAPS, PLATFORM_MODS_LOADED .. " " .. arg0.mapName)
|
2023-04-11 16:04:19 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-04-12 18:31:46 -04:00
|
|
|
function MapSelected(arg0, arg1)
|
|
|
|
SetMap(arg1, arg0.mapName, false)
|
|
|
|
mustLoadUsermaps(arg0, arg1)
|
2023-04-11 16:04:19 -04:00
|
|
|
end
|