t7x/data/ui_scripts/ranked/online_mods_loaded.lua

24 lines
703 B
Lua
Raw Normal View History

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