Fix typo in function name

to avoid future confusion
This commit is contained in:
okvdai
2023-04-29 17:13:43 +02:00
parent 354d23d991
commit 2a7d5d3ac6
5 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
global function pulseInit global function pulseInit
global function GetWeaponStatsFromToneAPI global function GetWeaponStatsFromToneAPI
global function GetMapStatsFromToneAPI global function GetMapStatsFromToneAPI
global function getWeaponKillsFromToneApi global function getWeaponKillsFromToneAPI
global function getNemesisWeaponFromToneAPI global function getNemesisWeaponFromToneAPI
global function getDWEFromToneAPI global function getDWEFromToneAPI
global function getMapKillFromToneAPI global function getMapKillFromToneAPI
@@ -90,7 +90,7 @@ void function GetMapStatsFromToneAPI()
NSHttpRequest(getMapStats, onSuccess, onFailure) NSHttpRequest(getMapStats, onSuccess, onFailure)
} }
int function getWeaponKillsFromToneApi(string weaponRef){ int function getWeaponKillsFromToneAPI(string weaponRef){
if(weaponRef in globalToneAPIKillData){ if(weaponRef in globalToneAPIKillData){
return expect int(globalToneAPIKillData[weaponRef]) return expect int(globalToneAPIKillData[weaponRef])
+11 -11
View File
@@ -337,25 +337,25 @@ function UpdateViewStatsOverviewMenu()
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue0" ), string( totalPilotKills ) ) Hud_SetText( GetElem( file.menu, "KillsAsPilotValue0" ), string( totalPilotKills ) )
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue1" ), string( GetPlayerStatInt( player, "kills_stats", "titanKillsAsPilot" ) ) ) Hud_SetText( GetElem( file.menu, "KillsAsPilotValue1" ), string( GetPlayerStatInt( player, "kills_stats", "titanKillsAsPilot" ) ) )
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue2" ), string( GetPlayerStatInt( player, "kills_stats", "totalNPC" ) ) ) Hud_SetText( GetElem( file.menu, "KillsAsPilotValue2" ), string( GetPlayerStatInt( player, "kills_stats", "totalNPC" ) ) )
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue3" ), string( getWeaponKillsFromToneApi("pilot_emptyhanded") ) ) Hud_SetText( GetElem( file.menu, "KillsAsPilotValue3" ), string( getWeaponKillsFromToneAPI("pilot_emptyhanded") ) )
Hud_SetText( GetElem( file.menu, "KillsAsPilotValue4" ), string( getWeaponKillsFromToneApi("human_execution") ) ) Hud_SetText( GetElem( file.menu, "KillsAsPilotValue4" ), string( getWeaponKillsFromToneAPI("human_execution") ) )
// Hud_SetText( GetElem( file.menu, "KillsAsPilotValue5" ), string( GetPlayerStatInt( player, "kills_stats", "titanFallKill" ) ) ) // Hud_SetText( GetElem( file.menu, "KillsAsPilotValue5" ), string( GetPlayerStatInt( player, "kills_stats", "titanFallKill" ) ) )
var titanMeleeKills = 0 var titanMeleeKills = 0
titanMeleeKills += getWeaponKillsFromToneApi("titan_punch_ion") titanMeleeKills += getWeaponKillsFromToneAPI("titan_punch_ion")
titanMeleeKills += getWeaponKillsFromToneApi("titan_punch_scorch") titanMeleeKills += getWeaponKillsFromToneAPI("titan_punch_scorch")
titanMeleeKills += getWeaponKillsFromToneApi("titan_punch_northstar") titanMeleeKills += getWeaponKillsFromToneAPI("titan_punch_northstar")
titanMeleeKills += getWeaponKillsFromToneApi("titan_sword") titanMeleeKills += getWeaponKillsFromToneAPI("titan_sword")
titanMeleeKills += getWeaponKillsFromToneApi("titan_punch_tone") titanMeleeKills += getWeaponKillsFromToneAPI("titan_punch_tone")
titanMeleeKills += getWeaponKillsFromToneApi("titan_punch_legion") titanMeleeKills += getWeaponKillsFromToneAPI("titan_punch_legion")
titanMeleeKills += getWeaponKillsFromToneApi("titan_punch_vanguard") titanMeleeKills += getWeaponKillsFromToneAPI("titan_punch_vanguard")
titanMeleeKills += getWeaponKillsFromToneApi("auto_titan_melee") titanMeleeKills += getWeaponKillsFromToneAPI("auto_titan_melee")
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue0" ), string( GetPlayerStatInt( player, "kills_stats", "pilotKillsAsTitan" ) ) ) Hud_SetText( GetElem( file.menu, "KillsAsTitanValue0" ), string( GetPlayerStatInt( player, "kills_stats", "pilotKillsAsTitan" ) ) )
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue1" ), string( GetPlayerStatInt( player, "kills_stats", "titanKillsAsTitan" ) ) ) Hud_SetText( GetElem( file.menu, "KillsAsTitanValue1" ), string( GetPlayerStatInt( player, "kills_stats", "titanKillsAsTitan" ) ) )
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue2" ), string( titanMeleeKills ) ) Hud_SetText( GetElem( file.menu, "KillsAsTitanValue2" ), string( titanMeleeKills ) )
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue3" ), string( GetPlayerStatInt( player, "kills_stats", "titanMeleePilot" ) ) ) Hud_SetText( GetElem( file.menu, "KillsAsTitanValue3" ), string( GetPlayerStatInt( player, "kills_stats", "titanMeleePilot" ) ) )
Hud_SetText( GetElem( file.menu, "KillsAsTitanValue4" ), string( getWeaponKillsFromToneApi("damagedef_titan_step") ) ) Hud_SetText( GetElem( file.menu, "KillsAsTitanValue4" ), string( getWeaponKillsFromToneAPI("damagedef_titan_step") ) )
} }
function PlotKDPointsOnGraph( menu, graphIndex, values, dottedAverage ) function PlotKDPointsOnGraph( menu, graphIndex, values, dottedAverage )
@@ -175,7 +175,7 @@ void function UpdateStatsForTitan( string titanRef, int loadoutIndex )
int aiKills int aiKills
foreach ( weaponRef in file.titanStatLoadout[ titanRef ] ) foreach ( weaponRef in file.titanStatLoadout[ titanRef ] )
{ {
totalKills += getWeaponKillsFromToneApi(weaponRef) totalKills += getWeaponKillsFromToneAPI(weaponRef)
pilotKills += GetPlayerStatInt( player, "weapon_kill_stats", "pilots", weaponRef ) pilotKills += GetPlayerStatInt( player, "weapon_kill_stats", "pilots", weaponRef )
titanKills += GetPlayerStatInt( player, "weapon_kill_stats", "titansTotal", weaponRef ) titanKills += GetPlayerStatInt( player, "weapon_kill_stats", "titansTotal", weaponRef )
aiKills += GetPlayerStatInt( player, "weapon_kill_stats", "ai", weaponRef ) aiKills += GetPlayerStatInt( player, "weapon_kill_stats", "ai", weaponRef )
@@ -338,7 +338,7 @@ table<string, table> function GetOverviewWeaponData()
if ( !PersistenceEnumValueIsValid( "loadoutWeaponsAndAbilities", weaponName ) ) if ( !PersistenceEnumValueIsValid( "loadoutWeaponsAndAbilities", weaponName ) )
continue continue
int val = getWeaponKillsFromToneApi(weaponName) int val = getWeaponKillsFromToneAPI(weaponName)
if ( val > Table[ "most_kills" ].val ) if ( val > Table[ "most_kills" ].val )
{ {
Table[ "most_kills" ].ref = weaponName Table[ "most_kills" ].ref = weaponName
@@ -357,8 +357,8 @@ table<string, table> function GetOverviewWeaponData()
float kdval = 0 float kdval = 0
float kval = 0 float kval = 0
float dval = 0 float dval = 0
if( getWeaponKillsFromToneApi(weaponName) != 0 && getDWEFromToneAPI(weaponName) != 0){ if( getWeaponKillsFromToneAPI(weaponName) != 0 && getDWEFromToneAPI(weaponName) != 0){
kval = float(getWeaponKillsFromToneApi(weaponName)) kval = float(getWeaponKillsFromToneAPI(weaponName))
dval = float(getDWEFromToneAPI(weaponName)) dval = float(getDWEFromToneAPI(weaponName))
if (kval / dval > kdval){ if (kval / dval > kdval){
kdval = kval / dval kdval = kval / dval
@@ -180,8 +180,8 @@ void function UpdateStatsForWeapon( string weaponRef )
} }
// Total Kills Stats // Total Kills Stats
SetStatsLabelValue( file.menu, "KillsValue0", getWeaponKillsFromToneApi(weaponRef) ) SetStatsLabelValue( file.menu, "KillsValue0", getWeaponKillsFromToneAPI(weaponRef) )
SetStatsLabelValue( file.menu, "KillsValue1", getWeaponKillsFromToneApi(weaponRef) ) SetStatsLabelValue( file.menu, "KillsValue1", getWeaponKillsFromToneAPI(weaponRef) )
SetStatsLabelValue( file.menu, "KillsValue2", GetPlayerStatInt( player, "weapon_kill_stats", "titansTotal", weaponRef ) ) SetStatsLabelValue( file.menu, "KillsValue2", GetPlayerStatInt( player, "weapon_kill_stats", "titansTotal", weaponRef ) )
SetStatsLabelValue( file.menu, "KillsValue3", GetPlayerStatInt( player, "weapon_kill_stats", "ai", weaponRef ) ) SetStatsLabelValue( file.menu, "KillsValue3", GetPlayerStatInt( player, "weapon_kill_stats", "ai", weaponRef ) )
} }