diff --git a/mod/scripts/vscripts/pulse.gnut b/mod/scripts/vscripts/pulse.gnut index 09f1408..6a7f254 100644 --- a/mod/scripts/vscripts/pulse.gnut +++ b/mod/scripts/vscripts/pulse.gnut @@ -1,7 +1,7 @@ global function GetStatsFromToneAPI global function getWeaponKillsFromToneApi -table globalToneAPIKillData = {} +global table globalToneAPIKillData = {} void function GetStatsFromToneAPI() { diff --git a/mod/scripts/vscripts/ui/menu_stats_overview.nut b/mod/scripts/vscripts/ui/menu_stats_overview.nut index 9c80dac..ab14cc3 100644 --- a/mod/scripts/vscripts/ui/menu_stats_overview.nut +++ b/mod/scripts/vscripts/ui/menu_stats_overview.nut @@ -311,22 +311,10 @@ function UpdateViewStatsOverviewMenu() SetStatsLabelValue( file.menu, "Last10GamesPVPValue", [ "#STATS_KD_VALUE", kdratiopvp_match_average ] ) PlotKDPointsOnGraph( file.menu, 1, kdratiopvp_match, lifetimeAveragePVP ) - int totalPilotKills = 0 + var totalPilotKills = 0 - array allWeapons = [] - - 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) + foreach (var key, var value in globalToneAPIKillData) { + totalPilotKills += value } /////////////////////////