Fix menu_stats_overview.nut

This commit is contained in:
okvdai
2023-04-20 18:36:25 +02:00
parent 4b779d2730
commit 3120fae436
2 changed files with 4 additions and 16 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
global function GetStatsFromToneAPI global function GetStatsFromToneAPI
global function getWeaponKillsFromToneApi global function getWeaponKillsFromToneApi
table globalToneAPIKillData = {} global table globalToneAPIKillData = {}
void function GetStatsFromToneAPI() void function GetStatsFromToneAPI()
{ {
@@ -311,22 +311,10 @@ function UpdateViewStatsOverviewMenu()
SetStatsLabelValue( file.menu, "Last10GamesPVPValue", [ "#STATS_KD_VALUE", kdratiopvp_match_average ] ) SetStatsLabelValue( file.menu, "Last10GamesPVPValue", [ "#STATS_KD_VALUE", kdratiopvp_match_average ] )
PlotKDPointsOnGraph( file.menu, 1, kdratiopvp_match, lifetimeAveragePVP ) PlotKDPointsOnGraph( file.menu, 1, kdratiopvp_match, lifetimeAveragePVP )
int totalPilotKills = 0 var totalPilotKills = 0
array<ItemDisplayData> allWeapons = [] foreach (var key, var value in globalToneAPIKillData) {
totalPilotKills += value
allWeapons.extend( GetVisibleItemsOfType( eItemTypes.PILOT_PRIMARY ) )
allWeapons.extend( GetVisibleItemsOfType( eItemTypes.PILOT_SECONDARY ) )
allWeapons.extend( GetVisibleItemsOfType( eItemTypes.TITAN_PRIMARY ) )
allWeapons.extend( GetVisibleItemsOfType( eItemTypes.TITAN_ORDNANCE ) )
allWeapons.extend( GetVisibleItemsOfType( eItemTypes.TITAN_ANTIRODEO ) )
allWeapons.extend( GetVisibleItemsOfType( eItemTypes.TITAN_SPECIAL ) )
foreach (weapon in allWeapons) {
string weaponName = weapon.ref
print(weaponName)
totalPilotKills += getWeaponKillsFromToneApi(weapon.ref)
print(totalPilotKills)
} }
///////////////////////// /////////////////////////