Untitled
Anonymous
Plain Text
09/30/2025 8:58 PM
5.4 KB
13
Indexable
Never
DataSources.ZMMapsList = ListHelper_SetupDataSource( "ZMMapsList", function ( f400_arg0, f400_arg1 )
local f400_local0 = {}
if CoD.perController[f400_arg0].choosingZMPlaylist then
local f400_local1 = Engine.GetPlaylistCategories()
local f400_local2 = CoD.PlaylistCategoryFilter or ""
local f400_local3 = FindPlaylistCategory( f400_local1, Engine.ProfileInt( f400_arg0, "playlist_" .. f400_local2 ) )
local f400_local4 = 0
for f400_local8, f400_local9 in ipairs( f400_local1 ) do
if f400_local9.filter == f400_local2 then
f400_local4 = f400_local4 + f400_local9.playerCount
end
end
f400_local5 = function ( f401_arg0 )
local f401_local0 = ""
if Engine.DvarBool( nil, "groupCountsVisible" ) == true then
f401_local0 = Engine.Localize( "MENU_CATEGORY_USER_COUNT", CoD.separateNumberWithCommas( f401_arg0.playerCount ), CoD.separateNumberWithCommas( f400_local4 ) )
else
local f401_local1 = 0
if f400_local4 > 0 then
f401_local1 = math.floor( f401_arg0.playerCount / f400_local4 * 100 + 0.5 )
end
f401_local0 = Engine.Localize( "MENU_CATEGORY_USER_PERCENT", f401_local1 )
end
local f401_local1 = f401_arg0.playlists[1]
local f401_local2 = true
local f401_local3
if f401_local1 then
f401_local3 = Engine.IsPlaylistLocked( f400_arg0, f401_local1.index )
if f401_local3 then
if IsDvarValueEqualTo( "ui_freeDLC1", "1" ) and Engine.GetDLCBitForMapName( f401_arg0.ref ) == CoD.DLCBits.CONTENT_DLC1 then
f401_local3 = false
else
f401_local3 = true
end
end
else
f401_local3 = true
end
if f401_local1 then
f401_local2 = f401_local3 and not ShowPurchasableMap( f400_arg0, f401_arg0.ref )
end
if f401_local2 then
return nil
end
local f401_local4 = f401_arg0.description
if f401_local3 then
f401_local4 = CoD.StoreUtility.AddUpsellToDescriptionIfNeeded( f400_arg0, f401_arg0.ref, f401_arg0.description )
end
local f401_local5 = Engine.IsMapValid( f401_arg0.ref )
local f401_local6 = {
models = {
displayText = CoD.StoreUtility.PrependPurchaseIconIfNeeded( f400_arg0, f401_arg0.ref, Engine.ToUpper( f401_arg0.name ) ) or "",
mapName = Engine.ToUpper( f401_arg0.name ) or "",
Image = f401_arg0.icon or "playlist_standard",
mapDescription = f401_local4,
playingCount = f401_local0
}
}
local f401_local7 = {
id = f401_arg0.ref,
mapId = f401_arg0.ref,
category = f401_arg0,
playlist = f401_local1,
selectIndex = f401_arg0 == f400_local3,
disabled = f401_local5 and f401_local3
}
local f401_local8
if not f401_local5 then
local f401_local9 = f401_local3
f401_local8 = ShowPurchasableMap( f400_arg0, f401_arg0.ref )
else
f401_local8 = false
end
f401_local7.purchasable = f401_local8
f401_local6.properties = f401_local7
return f401_local6
end
for f400_local9, f400_local11 in ipairs( f400_local1 ) do
if f400_local11.filter == f400_local2 then
local f400_local10 = f400_local5( f400_local11 )
if f400_local10 then
table.insert( f400_local0, f400_local10 )
end
end
end
if not f400_arg1.updateLobbyButtonsSubscription then
f400_arg1.updateLobbyButtonsSubscription = f400_arg1:subscribeToModel( Engine.CreateModel( Engine.GetGlobalModel(), "lobbyRoot.lobbyButtonUpdate" ), function ()
f400_arg1:updateDataSource( true )
end, false )
end
else
for f400_local4, f400_local5 in LUI.IterateTableBySortedKeys( CoD.mapsTable, function ( f403_arg0, f403_arg1 )
return CoD.mapsTable[f403_arg0].unique_id < CoD.mapsTable[f403_arg1].unique_id
end, nil ) do
if f400_local5.session_mode == Enum.eModes.MODE_ZOMBIES and f400_local5.dlc_pack ~= -1 and (not CoD.IsHiddenDLC( Engine.GetDLCBitForMapName( f400_local4 ) ) or Engine.IsMapValid( f400_local4 )) and (ShowPurchasableMap( f400_arg0, f400_local4 ) or Engine.IsMapValid( f400_local4 )) then
table.insert( f400_local0, {
models = {
displayText = CoD.StoreUtility.PrependPurchaseIconIfNeeded( f400_arg0, f400_local4, Engine.Localize( f400_local5.mapNameCaps ) ),
Image = f400_local5.previewImage,
mapName = f400_local5.mapName,
mapLocation = f400_local5.mapLocation,
mapDescription = CoD.StoreUtility.AddUpsellToDescriptionIfNeeded( f400_arg0, f400_local4, f400_local5.mapDescription ),
playingCount = "",
dlcIndex = f400_local5.dlc_pack
},
properties = {
mapId = f400_local4,
purchasable = not Engine.IsMapValid( f400_local4 )
}
} )
end
end
if Mods_Enabled() then
f400_local2 = Engine.Mods_Lists_GetInfoEntries( LuaEnums.USERMAP_BASE_PATH, 0, Engine.Mods_Lists_GetInfoEntriesCount( LuaEnums.USERMAP_BASE_PATH ) )
if f400_local2 then
for f400_local12 = 0, #f400_local2, 1 do
local f400_local6 = f400_local2[f400_local12]
if LUI.startswith( f400_local6.internalName, "zm_" ) then
table.insert( f400_local0, {
models = {
displayText = string.sub( f400_local6.name, 1, 32 ),
Image = f400_local6.ugcName,
mapName = f400_local6.name,
mapDescription = f400_local6.description
},
properties = {
mapId = f400_local6.ugcName
}
} )
end
end
end
end
end
CoD.StoreUtility.AddListDLCListener( f400_arg1 )
return f400_local0
end, true )Editor is loading...
Leave a Comment