Parser rewrite

This commit is contained in:
okvdai
2023-06-07 21:18:35 +02:00
parent ddfb34a9f8
commit 1109be0ece
7 changed files with 47 additions and 54 deletions
@@ -153,16 +153,16 @@ void function UpdateStatsForMap( string mapName )
//SetStatBoxDisplay( Hud_GetChild( file.menu, "Stat3" ), Localize( "#STATS_GAMES_PLAYED" ), gamesPlayed )
SetStatsLabelValue( file.menu, "KillsLabel0", "KILLS ON MAP" )
SetStatsLabelValue( file.menu, "KillsValue0", pulseParse(mapName, "maps", "kills") )
SetStatsLabelValue( file.menu, "KillsValue0", pulseParse("maps", mapName, "kills") )
SetStatsLabelValue( file.menu, "KillsLabel1", "DEATHS ON MAP" )
SetStatsLabelValue( file.menu, "KillsValue1", pulseParse(mapName, "maps", "deaths") )
SetStatsLabelValue( file.menu, "KillsValue1", pulseParse("maps", mapName, "deaths") )
SetStatsLabelValue( file.menu, "KillsLabel2", "TOTAL SHOT DISTANCE" )
SetStatsLabelValue( file.menu, "KillsValue2", string(int((1.905 * float(pulseParse(mapName, "maps", "total_distance") ) ) )/100) + "m" )
SetStatsLabelValue( file.menu, "KillsValue2", string(int((1.905 * float(pulseParse("maps", mapName, "total_distance") ) ) )/100) + "m" )
SetStatsLabelValue( file.menu, "KillsLabel3", "MAXIMUM SHOT DISTANCE" )
SetStatsLabelValue( file.menu, "KillsValue3", string(int((1.905 * float(pulseParse(mapName, "maps", "max_distance") ) ) )/100) + "m" )
SetStatsLabelValue( file.menu, "KillsValue3", string(int((1.905 * float(pulseParse("maps", mapName, "max_distance") ) ) )/100) + "m" )
SetStatsLabelValue( file.menu, "KillsLabel4", "--" )
SetStatsLabelValue( file.menu, "KillsValue4", "--" )
@@ -194,7 +194,7 @@ void function UpdateStatsForMap( string mapName )
if (mapName in pulseData["gamemodesSeparated"])
{
float modePlayedTime = 0
modePlayedTime = float(pulseParse(mapName, "gamemodesSeparated", modeName, "kills"))
modePlayedTime = float(pulseParse("gamemodesSeparated", mapName, modeName, "kills"))
if ( modePlayedTime > 0 ) {
AddPieChartEntry( modes, GameMode_GetName( modeName ), modePlayedTime, GetGameModeDisplayColor( modeName ) )
}
@@ -205,7 +205,7 @@ void function UpdateStatsForMap( string mapName )
if (mapName in pulseData["gamemodesSeparated"])
{
float modePlayedTime = 0
modePlayedTime = float(pulseParse(mapName, "gamemodesSeparated", key, "kills"))
modePlayedTime = float(pulseParse("gamemodesSeparated", mapName, key, "kills"))
if ( modePlayedTime > 0 ) {
AddPieChartEntry( modes, customGamemodeNames[key], modePlayedTime, value)
}