643 lines
19 KiB
Lua
643 lines
19 KiB
Lua
SvS = {
|
|
MaxSquadSize = 6,
|
|
OrderArraySize = 10,
|
|
MaxAILoadoutIndex = 5,
|
|
SquadModeDvar = "ui_squad_mode",
|
|
SquadPlaylistCategory = 5,
|
|
ShowChatRestrict = false,
|
|
PlaylistTags = {
|
|
Invalid = 0,
|
|
SquadAssault = 1,
|
|
SquadVsSquad = 2,
|
|
Safeguard = 3,
|
|
SafeguardExtended = 4,
|
|
SafeguardInfinite = 5,
|
|
Wargame1 = 6,
|
|
Wargame2 = 7,
|
|
Wargame3 = 8,
|
|
Wargame4 = 9,
|
|
Wargame5 = 10,
|
|
Wargame6 = 11,
|
|
Wargame7 = 12,
|
|
Wargame8 = 13,
|
|
DLC_Safeguard1 = 14,
|
|
DLC_Safeguard2 = 15,
|
|
DLC_Safeguard3 = 16,
|
|
DLC_Safeguard4 = 17,
|
|
DLC_Wargame1 = 18,
|
|
DLC_Wargame2 = 19,
|
|
DLC_Wargame3 = 20,
|
|
DLC_Wargame4 = 21
|
|
},
|
|
Reports = {
|
|
MaxReports = 5,
|
|
MatchOutcomeKeys = {
|
|
Victory = "Victory",
|
|
Defeat = "Defeat",
|
|
Draw = "Draw",
|
|
Forfeit = "Forfeit"
|
|
},
|
|
MatchOutcomeArray = {
|
|
"Victory",
|
|
"Defeat",
|
|
"Draw",
|
|
"Forfeit"
|
|
},
|
|
MatchOutcomeStrings = {
|
|
Victory = "LUA_MENU_REPORT_VICTORY",
|
|
Defeat = "LUA_MENU_REPORT_DEFEAT",
|
|
Draw = "LUA_MENU_REPORT_DRAW",
|
|
Forfeit = "LUA_MENU_REPORT_REASON_FORFEIT"
|
|
},
|
|
MatchOutcomeColors = {
|
|
Victory = {
|
|
textColor = {
|
|
r = 0.55,
|
|
g = 0.78,
|
|
b = 0.24
|
|
},
|
|
bgColor = {
|
|
r = 0,
|
|
g = 1,
|
|
b = 0
|
|
}
|
|
},
|
|
Defeat = {
|
|
textColor = {
|
|
r = 0.94,
|
|
g = 0.12,
|
|
b = 0.12
|
|
},
|
|
bgColor = Colors.red
|
|
},
|
|
Draw = {
|
|
textColor = Colors.window_title_text_color,
|
|
bgColor = Colors.white
|
|
},
|
|
Forfeit = {
|
|
textColor = {
|
|
r = 0.55,
|
|
g = 0.78,
|
|
b = 0.24
|
|
},
|
|
bgColor = {
|
|
r = 0,
|
|
g = 1,
|
|
b = 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
PostMatchDataCache = {
|
|
enemyPlayercard = {}
|
|
},
|
|
SquadModes = {
|
|
SquadAssault = {
|
|
ModeDvarValue = 0,
|
|
PlaylistTagValue = SvS.PlaylistTags.SquadAssault,
|
|
RequiresMatchmaking = true,
|
|
HasReports = true,
|
|
HasCompare = true,
|
|
RecordsStats = true,
|
|
DynamicMatchmaking = false,
|
|
HasLeaderboard = true
|
|
},
|
|
SquadVsSquad = {
|
|
ModeDvarValue = 4,
|
|
PlaylistTagValue = SvS.PlaylistTags.SquadVsSquad,
|
|
RequiresMatchmaking = true,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = true,
|
|
DynamicMatchmaking = false,
|
|
HasLeaderboard = false
|
|
},
|
|
Safeguard = {
|
|
ModeDvarValue = 1,
|
|
PlaylistTagValue = SvS.PlaylistTags.Safeguard,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = true
|
|
},
|
|
SafeguardExtended = {
|
|
ModeDvarValue = 2,
|
|
PlaylistTagValue = SvS.PlaylistTags.SafeguardExtended,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = true
|
|
},
|
|
SafeguardInfinite = {
|
|
ModeDvarValue = 3,
|
|
PlaylistTagValue = SvS.PlaylistTags.SafeguardInfinite,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = true
|
|
},
|
|
Wargame1 = {
|
|
ModeDvarValue = 5,
|
|
PlaylistTagValue = SvS.PlaylistTags.Wargame1,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = false
|
|
},
|
|
Wargame2 = {
|
|
ModeDvarValue = 6,
|
|
PlaylistTagValue = SvS.PlaylistTags.Wargame2,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = false
|
|
},
|
|
Wargame3 = {
|
|
ModeDvarValue = 7,
|
|
PlaylistTagValue = SvS.PlaylistTags.Wargame3,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = false
|
|
},
|
|
Wargame4 = {
|
|
ModeDvarValue = 8,
|
|
PlaylistTagValue = SvS.PlaylistTags.Wargame4,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = false
|
|
},
|
|
Wargame5 = {
|
|
ModeDvarValue = 9,
|
|
PlaylistTagValue = SvS.PlaylistTags.Wargame5,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = false
|
|
},
|
|
Wargame6 = {
|
|
ModeDvarValue = 10,
|
|
PlaylistTagValue = SvS.PlaylistTags.Wargame6,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = false
|
|
},
|
|
Wargame7 = {
|
|
ModeDvarValue = 11,
|
|
PlaylistTagValue = SvS.PlaylistTags.Wargame7,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = false
|
|
},
|
|
Wargame8 = {
|
|
ModeDvarValue = 12,
|
|
PlaylistTagValue = SvS.PlaylistTags.Wargame8,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = false
|
|
},
|
|
DLC_Safeguard1 = {
|
|
ModeDvarValue = 13,
|
|
PlaylistTagValue = SvS.PlaylistTags.DLC_Safeguard1,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = true
|
|
},
|
|
DLC_Safeguard2 = {
|
|
ModeDvarValue = 14,
|
|
PlaylistTagValue = SvS.PlaylistTags.DLC_Safeguard2,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = true
|
|
},
|
|
DLC_Safeguard3 = {
|
|
ModeDvarValue = 15,
|
|
PlaylistTagValue = SvS.PlaylistTags.DLC_Safeguard3,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = true
|
|
},
|
|
DLC_Safeguard4 = {
|
|
ModeDvarValue = 16,
|
|
PlaylistTagValue = SvS.PlaylistTags.DLC_Safeguard4,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = true
|
|
},
|
|
DLC_Wargame1 = {
|
|
ModeDvarValue = 17,
|
|
PlaylistTagValue = SvS.PlaylistTags.DLC_Wargame1,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = false
|
|
},
|
|
DLC_Wargame2 = {
|
|
ModeDvarValue = 18,
|
|
PlaylistTagValue = SvS.PlaylistTags.DLC_Wargame2,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = false
|
|
},
|
|
DLC_Wargame3 = {
|
|
ModeDvarValue = 19,
|
|
PlaylistTagValue = SvS.PlaylistTags.DLC_Wargame3,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = false
|
|
},
|
|
DLC_Wargame4 = {
|
|
ModeDvarValue = 20,
|
|
PlaylistTagValue = SvS.PlaylistTags.DLC_Wargame4,
|
|
RequiresMatchmaking = false,
|
|
HasReports = false,
|
|
HasCompare = false,
|
|
RecordsStats = false,
|
|
DynamicMatchmaking = true,
|
|
HasLeaderboard = false
|
|
}
|
|
},
|
|
SquadCategories = {
|
|
{
|
|
Devname = "squad_assault",
|
|
NameLocRefCaps = "LUA_MENU_SQUAD_ASSAULT_CAPS",
|
|
DescLocRef = "LUA_MENU_SQUAD_ASSAULT_DESC",
|
|
PlayersDescLocRef = "LUA_MENU_SQUAD_ASSAULT_PLAYER_DESC",
|
|
PlayersAltDescLocRef = "",
|
|
Image = "img_squadmode_01",
|
|
Modes = {
|
|
SvS.SquadModes.SquadAssault
|
|
}
|
|
},
|
|
{
|
|
Devname = "squad_vs_squad",
|
|
NameLocRefCaps = "LUA_MENU_SQUAD_VS_SQUAD_CAPS",
|
|
DescLocRef = "LUA_MENU_SQUAD_VS_SQUAD_DESC",
|
|
PlayersDescLocRef = "LUA_MENU_SQUAD_VS_SQUAD_PLAYER_DESC",
|
|
PlayersAltDescLocRef = "",
|
|
Image = "img_squadmode_02",
|
|
Modes = {
|
|
SvS.SquadModes.SquadVsSquad
|
|
}
|
|
},
|
|
{
|
|
Devname = "safeguard",
|
|
NameLocRefCaps = "LUA_MENU_HORDE_CAPS",
|
|
DescLocRef = "LUA_MENU_SAFEGUARD_DESC",
|
|
PlayersDescLocRef = "LUA_MENU_SAFEGUARD_PLAYER_DESC",
|
|
PlayersAltDescLocRef = "LUA_MENU_SAFEGUARD_PLAYER_DESC_ALT",
|
|
Image = "img_squadmode_03",
|
|
Modes = {
|
|
SvS.SquadModes.Safeguard,
|
|
SvS.SquadModes.SafeguardExtended,
|
|
SvS.SquadModes.SafeguardInfinite
|
|
}
|
|
},
|
|
{
|
|
Devname = "wargame",
|
|
NameLocRefCaps = "LUA_MENU_WARGAME_CAPS",
|
|
DescLocRef = "LUA_MENU_WARGAME_DESC",
|
|
PlayersDescLocRef = "LUA_MENU_WARGAME_PLAYER_DESC",
|
|
PlayersAltDescLocRef = "LUA_MENU_WARGAME_PLAYER_DESC_ALT",
|
|
Image = "img_squadmode_04",
|
|
Modes = {
|
|
SvS.SquadModes.Wargame1,
|
|
SvS.SquadModes.Wargame2,
|
|
SvS.SquadModes.Wargame3,
|
|
SvS.SquadModes.Wargame4,
|
|
SvS.SquadModes.Wargame5,
|
|
SvS.SquadModes.Wargame6,
|
|
SvS.SquadModes.Wargame7,
|
|
SvS.SquadModes.Wargame8
|
|
}
|
|
}
|
|
},
|
|
SquadDLCCategories = {
|
|
{
|
|
Devname = "squads_dlc",
|
|
NameLocRefCaps = "PATCH_MENU_SQUADS_DLC_CATEGORY_CAPS",
|
|
DescLocRef = "PATCH_MENU_SQUADS_DLC_DESC",
|
|
PlayersDescLocRef = "",
|
|
PlayersAltDescLocRef = "",
|
|
Image = "img_squadmode_dlc",
|
|
Modes = {
|
|
SvS.SquadModes.DLC_Safeguard1,
|
|
SvS.SquadModes.DLC_Wargame1
|
|
}
|
|
},
|
|
{
|
|
Devname = "squads_dlc",
|
|
NameLocRefCaps = "LUA_MENU_MP_SQUADS_DLC_CATEGORY_2_CAPS",
|
|
DescLocRef = "LUA_MENU_MP_SQUADS_DLC_DESC_2",
|
|
PlayersDescLocRef = "",
|
|
PlayersAltDescLocRef = "",
|
|
Image = "img_squadmode_dlc",
|
|
Modes = {
|
|
SvS.SquadModes.DLC_Safeguard2,
|
|
SvS.SquadModes.DLC_Wargame2
|
|
}
|
|
},
|
|
{
|
|
Devname = "squads_dlc",
|
|
NameLocRefCaps = "LUA_MENU_MP_SQUADS_DLC_CATEGORY_3_CAPS",
|
|
DescLocRef = "LUA_MENU_MP_SQUADS_DLC_DESC_3",
|
|
PlayersDescLocRef = "",
|
|
PlayersAltDescLocRef = "",
|
|
Image = "img_squadmode_dlc",
|
|
Modes = {
|
|
SvS.SquadModes.DLC_Safeguard3,
|
|
SvS.SquadModes.DLC_Wargame3
|
|
}
|
|
},
|
|
{
|
|
Devname = "squads_dlc",
|
|
NameLocRefCaps = "LUA_MENU_MP_SQUADS_DLC_CATEGORY_4_CAPS",
|
|
DescLocRef = "LUA_MENU_MP_SQUADS_DLC_DESC_4",
|
|
PlayersDescLocRef = "",
|
|
PlayersAltDescLocRef = "",
|
|
Image = "img_squadmode_dlc",
|
|
Modes = {
|
|
SvS.SquadModes.DLC_Safeguard4,
|
|
SvS.SquadModes.DLC_Wargame4
|
|
}
|
|
}
|
|
},
|
|
IsSvS = function ()
|
|
return Engine.IsSquadVsSquadMode and Engine.IsSquadVsSquadMode()
|
|
end,
|
|
GetLocalPlayerBaseName = function ( f2_arg0 )
|
|
return Engine.GetPlayerDataEx( f2_arg0, CoD.StatsGroup.Ranked, "squadHQ", "squad_base" )
|
|
end,
|
|
GetBasePreviewImageSmall = function ( f3_arg0 )
|
|
return "preview_" .. f3_arg0 .. "_vote"
|
|
end,
|
|
GetBasePreviewImageLarge = function ( f4_arg0 )
|
|
return "preview_" .. f4_arg0
|
|
end,
|
|
GetSquadReportData = function ( f5_arg0, f5_arg1 )
|
|
local f5_local0 = function ( f6_arg0 )
|
|
local f6_local0 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.Ranked, "squadHQ", "reports", f6_arg0, "time" )
|
|
return f6_local0 and f6_local0 ~= 0
|
|
end
|
|
|
|
f5_arg1 = ((Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.Ranked, "squadHQ", "reportIndex" ) - 1) % SvS.Reports.MaxReports - f5_arg1) % SvS.Reports.MaxReports
|
|
if not f5_local0( f5_arg1 ) then
|
|
return nil
|
|
end
|
|
local f5_local1 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.Ranked, "squadHQ", "reports", f5_arg1, "time" ) or 0
|
|
local f5_local2 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.Ranked, "squadHQ", "reports", f5_arg1, "squadName" ) or ""
|
|
local f5_local3 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.Ranked, "squadHQ", "reports", f5_arg1, "enemyName" ) or ""
|
|
local f5_local4 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.Ranked, "squadHQ", "reports", f5_arg1, "your_score" ) or 0
|
|
local f5_local5 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.Ranked, "squadHQ", "reports", f5_arg1, "their_score" ) or 0
|
|
local f5_local6 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.Ranked, "squadHQ", "reports", f5_arg1, "squad_mode" ) or ""
|
|
local f5_local7 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.Ranked, "squadHQ", "reports", f5_arg1, "squad_base" ) or ""
|
|
local f5_local8 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.Ranked, "squadHQ", "reports", f5_arg1, "won_match" ) or 0
|
|
local f5_local9 = Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.Ranked, "squadHQ", "reports", f5_arg1, "xp" ) or 0
|
|
local f5_local10 = {
|
|
isReport = true,
|
|
reportIndex = f5_arg1
|
|
}
|
|
if f5_local1 then
|
|
local f5_local11 = Engine.GetFormattedDateTimeForEvent
|
|
local f5_local12 = Engine.GetFormattedDateTimeForEvent( f5_local1 )
|
|
end
|
|
f5_local10.timeString = f5_local11 and f5_local12 or ""
|
|
f5_local10.gametype = f5_local6
|
|
f5_local10.mapName = f5_local7
|
|
f5_local10.matchOutcome = SvS.GetReportOutcomeKeyFromPlayerdataValue( f5_local8 )
|
|
f5_local10.enemySquadName = f5_local2
|
|
f5_local10.enemyName = f5_local3
|
|
f5_local10.enemyScore = f5_local5
|
|
f5_local10.yourScore = f5_local4
|
|
if f5_local9 < 0 then
|
|
f5_local10.didEarnXP = false
|
|
f5_local10.xpString = Engine.Localize( "LUA_MENU_CHALLENGE_MATCH_CAPS" )
|
|
elseif f5_local9 == 0 then
|
|
f5_local10.didEarnXP = true
|
|
f5_local10.xpString = Engine.Localize( "LUA_MENU_XP_BONUS_CAPPED_OUT" )
|
|
else
|
|
f5_local10.didEarnXP = true
|
|
f5_local10.xpString = Engine.Localize( "LUA_MENU_XP_BONUS_EARNED", Engine.MarkLocalized( Engine.FormatTimeHoursMinutesSeconds( f5_local9 ) ) )
|
|
end
|
|
f5_local10.enemyPlayercardProps = Squad.GetReportPlayercard( f5_arg0, f5_local10.reportIndex )
|
|
if f5_local10.enemyPlayercardProps then
|
|
f5_local10.enemyPlayercardProps.gamertag = f5_local3
|
|
f5_local10.enemyPlayercardProps.clantag = Squad.GetClanTagForReport( f5_arg0, f5_local10.reportIndex )
|
|
else
|
|
f5_local10.enemyPlayercardProps = {}
|
|
f5_local10.enemyPlayercardProps.valid = false
|
|
f5_local10.enemyPlayercardProps.gamertag = f5_local3
|
|
f5_local10.enemyPlayercardProps.clantag = Squad.GetClanTagForReport( f5_arg0, f5_local10.reportIndex )
|
|
f5_local10.enemyPlayercardProps.rank = 0
|
|
f5_local10.enemyPlayercardProps.prestige = nil
|
|
f5_local10.enemyPlayercardProps.background = 0
|
|
f5_local10.enemyPlayercardProps.patchEmblem = 0
|
|
end
|
|
return f5_local10
|
|
end,
|
|
GetReportOutcomeKeyFromWinLoss = function ( f7_arg0, f7_arg1 )
|
|
local f7_local0 = nil
|
|
if f7_arg0 then
|
|
f7_local0 = SvS.Reports.MatchOutcomeKeys.Victory
|
|
elseif f7_arg1 then
|
|
f7_local0 = SvS.Reports.MatchOutcomeKeys.Defeat
|
|
else
|
|
f7_local0 = SvS.Reports.MatchOutcomeKeys.Draw
|
|
end
|
|
return f7_local0
|
|
end,
|
|
GetReportOutcomeKeyFromPlayerdataValue = function ( f8_arg0 )
|
|
local f8_local0 = assert
|
|
local f8_local1
|
|
if f8_arg0 < 0 and f8_arg0 >= #SvS.Reports.MatchOutcomeArray then
|
|
f8_local1 = false
|
|
else
|
|
f8_local1 = true
|
|
end
|
|
f8_local0( f8_local1 )
|
|
return SvS.Reports.MatchOutcomeArray[f8_arg0 + 1]
|
|
end,
|
|
GetReportOutcomeText = function ( f9_arg0 )
|
|
return Engine.Localize( SvS.Reports.MatchOutcomeStrings[f9_arg0] )
|
|
end,
|
|
BuildSquadMemberCompareData = function ( f10_arg0, f10_arg1, f10_arg2 )
|
|
if not Lobby.GetSquadMemberInfo then
|
|
return
|
|
else
|
|
local f10_local0 = Lobby.GetSquadMemberInfo( f10_arg1 - 1, f10_arg2, f10_arg0 )
|
|
f10_local0.name = f10_local0.gamertag
|
|
f10_local0.weaponIndex = f10_local0.weapon
|
|
return f10_local0
|
|
end
|
|
end,
|
|
BuildSquadCompareData = function ( f11_arg0 )
|
|
if not Squad.FoundMatch() then
|
|
return
|
|
end
|
|
local f11_local0 = {
|
|
isCompare = true,
|
|
enemySquadName = Squad.GetEnemySquadName() or ""
|
|
}
|
|
local f11_local1 = Squad.GetCompareInfoForLobby( f11_arg0 )
|
|
f11_local0.yourWins = f11_local1.friendlyWins or 0
|
|
f11_local0.yourLosses = f11_local1.friendlyLosses or 0
|
|
f11_local0.yourWinStreak = f11_local1.friendlyWinStreak or 0
|
|
f11_local0.enemyWins = f11_local1.enemyWins or 0
|
|
f11_local0.enemyLosses = f11_local1.enemyLosses or 0
|
|
f11_local0.enemyWinStreak = f11_local1.enemyWinStreak or 0
|
|
f11_local0.enemyTeam = {}
|
|
f11_local0.yourTeam = {}
|
|
for f11_local2 = 1, SvS.MaxSquadSize, 1 do
|
|
f11_local0.enemyTeam[f11_local2] = SvS.BuildSquadMemberCompareData( f11_arg0, f11_local2, true, memberInfo )
|
|
if not f11_local0.enemyTeam[f11_local2].name then
|
|
return nil
|
|
end
|
|
f11_local0.yourTeam[f11_local2] = SvS.BuildSquadMemberCompareData( f11_arg0, f11_local2, false, memberInfo )
|
|
if not f11_local0.yourTeam[f11_local2].name then
|
|
return nil
|
|
end
|
|
end
|
|
local f11_local2 = Lobby.GetSquadMemberInfo( 0, true, f11_arg0 )
|
|
f11_local0.enemyPlayercardProps = {
|
|
gamertag = f11_local2.gamertag,
|
|
clantag = f11_local2.clantag,
|
|
rank = f11_local2.rank,
|
|
prestige = f11_local2.prestige,
|
|
background = f11_local2.background,
|
|
patchEmblem = f11_local2.patch
|
|
}
|
|
return f11_local0
|
|
end,
|
|
CachePostMatchData = function ( f12_arg0 )
|
|
SvS.PostMatchDataCache = f12_arg0
|
|
end,
|
|
GetCachedPostMatchData = function ()
|
|
return SvS.PostMatchDataCache
|
|
end,
|
|
ShouldDisplayAAR = function ()
|
|
return Engine.GetClientMatchData( "alliesScore" ) ~= nil
|
|
end,
|
|
GetPlaylistFromSquadMode = function ( f15_arg0 )
|
|
local f15_local0, f15_local1 = Squad.GetSquadModePlaylist( Engine.GetFirstActiveController(), f15_arg0.PlaylistTagValue )
|
|
return f15_local0, f15_local1
|
|
end,
|
|
GetCurrentSquadModeInfo = function ()
|
|
local f16_local0 = Engine.GetDvarInt( SvS.SquadModeDvar )
|
|
for f16_local4, f16_local5 in pairs( SvS.SquadModes ) do
|
|
if f16_local5.ModeDvarValue == f16_local0 then
|
|
return f16_local5
|
|
end
|
|
end
|
|
end,
|
|
SetCurrentSquadModeInfo = function ( f17_arg0 )
|
|
Engine.SetDvarInt( SvS.SquadModeDvar, f17_arg0.ModeDvarValue )
|
|
end,
|
|
IsSquadModeDisabled = function ( f18_arg0 )
|
|
local f18_local0, f18_local1 = SvS.GetPlaylistFromSquadMode( f18_arg0 )
|
|
if f18_local0 == -1 or f18_local1 == -1 then
|
|
return true
|
|
else
|
|
return not Playlist.GetItemEnabled( f18_local0, f18_local1 )
|
|
end
|
|
end,
|
|
IsCurrentSquadModeDisabled = function ()
|
|
return SvS.IsSquadModeDisabled( SvS.GetCurrentSquadModeInfo() )
|
|
end,
|
|
GetSquadPlaylistImage = function ( f20_arg0 )
|
|
local f20_local0, f20_local1 = SvS.GetPlaylistFromSquadMode( f20_arg0.Modes[1] )
|
|
if f20_local0 == -1 or f20_local1 == -1 then
|
|
return ""
|
|
else
|
|
return Playlist.GetItemImage( f20_local0, f20_local1 )
|
|
end
|
|
end,
|
|
GetSquadPlaylistImageByMode = function ( f21_arg0 )
|
|
local f21_local0, f21_local1 = SvS.GetPlaylistFromSquadMode( f21_arg0 )
|
|
if f21_local0 == -1 or f21_local1 == -1 then
|
|
return ""
|
|
else
|
|
return Playlist.GetItemImage( f21_local0, f21_local1 )
|
|
end
|
|
end,
|
|
GetSquadCategoryDesc = function ( f22_arg0 )
|
|
return f22_arg0.DescLocRef and Engine.Localize( f22_arg0.DescLocRef ) or ""
|
|
end,
|
|
GetSquadModeDesc = function ( f23_arg0 )
|
|
local f23_local0, f23_local1 = SvS.GetPlaylistFromSquadMode( f23_arg0 )
|
|
return Engine.MarkLocalized( Playlist.GetItemDesc( f23_local0, f23_local1 ) )
|
|
end,
|
|
GetSquadModeTitleText = function ( f24_arg0 )
|
|
local f24_local0, f24_local1 = SvS.GetPlaylistFromSquadMode( f24_arg0 )
|
|
return Engine.MarkLocalized( Playlist.GetItemName( f24_local0, f24_local1 ) )
|
|
end,
|
|
GetSquadCategoryFromMode = function ( f25_arg0 )
|
|
for f25_local0 = 1, #SvS.SquadCategories, 1 do
|
|
local f25_local3 = SvS.SquadCategories[f25_local0]
|
|
for f25_local4 = 1, #f25_local3.Modes, 1 do
|
|
if f25_local3.Modes[f25_local4] == f25_arg0 then
|
|
return f25_local3
|
|
end
|
|
end
|
|
end
|
|
end,
|
|
GetSquadMemberIndexFromOrderIndex = function ( f26_arg0, f26_arg1 )
|
|
return Engine.GetPlayerDataEx( f26_arg0, CoD.StatsGroup.Ranked, "squadHQ", "aiSquadMembers", f26_arg1 ) or 0
|
|
end,
|
|
SetSquadMemberOrder = function ( f27_arg0, f27_arg1, f27_arg2 )
|
|
return Engine.SetPlayerDataEx( f27_arg0, CoD.StatsGroup.Ranked, "squadHQ", "aiSquadMembers", f27_arg1, f27_arg2 )
|
|
end,
|
|
FindSquadMemberOrderIndex = function ( f28_arg0, f28_arg1 )
|
|
for f28_local0 = 0, SvS.OrderArraySize - 1, 1 do
|
|
if Engine.GetPlayerDataEx( f28_arg0, CoD.StatsGroup.Ranked, "squadHQ", "aiSquadMembers", f28_local0 ) == f28_arg1 then
|
|
return f28_local0
|
|
end
|
|
end
|
|
end
|
|
}
|