Work on making map piecharts function
again...
This commit is contained in:
@@ -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("maps", mapName, "kills") )
|
||||
SetStatsLabelValue( file.menu, "KillsValue0", pulseParse("maps", mapName.slice(3), "kills") )
|
||||
|
||||
SetStatsLabelValue( file.menu, "KillsLabel1", "DEATHS ON MAP" )
|
||||
SetStatsLabelValue( file.menu, "KillsValue1", pulseParse("maps", mapName, "deaths") )
|
||||
SetStatsLabelValue( file.menu, "KillsValue1", pulseParse("maps", mapName.slice(3), "deaths") )
|
||||
|
||||
SetStatsLabelValue( file.menu, "KillsLabel2", "TOTAL SHOT DISTANCE" )
|
||||
SetStatsLabelValue( file.menu, "KillsValue2", string(int((1.905 * float(pulseParse("maps", mapName, "total_distance") ) ) )/100) + "m" )
|
||||
SetStatsLabelValue( file.menu, "KillsValue2", string(int((1.905 * float(pulseParse("maps", mapName.slice(3), "total_distance") ) ) )/100) + "m" )
|
||||
|
||||
SetStatsLabelValue( file.menu, "KillsLabel3", "MAXIMUM SHOT DISTANCE" )
|
||||
SetStatsLabelValue( file.menu, "KillsValue3", string(int((1.905 * float(pulseParse("maps", mapName, "max_distance") ) ) )/100) + "m" )
|
||||
SetStatsLabelValue( file.menu, "KillsValue3", string(int((1.905 * float(pulseParse("maps", mapName.slice(3), "max_distance") ) ) )/100) + "m" )
|
||||
|
||||
SetStatsLabelValue( file.menu, "KillsLabel4", "--" )
|
||||
SetStatsLabelValue( file.menu, "KillsValue4", "--" )
|
||||
@@ -191,21 +191,23 @@ void function UpdateStatsForMap( string mapName )
|
||||
for ( int modeId = 0; modeId < enumCount; modeId++ )
|
||||
{
|
||||
string modeName = PersistenceGetEnumItemNameForIndex( "gameModes", modeId )
|
||||
if (mapName in pulseData["gamemodesSeparated"])
|
||||
if (mapName.slice(3) in pulseData["gamemodesSeparated"])
|
||||
{
|
||||
float modePlayedTime = 0
|
||||
modePlayedTime = float(pulseParse("gamemodesSeparated", mapName, modeName, "kills"))
|
||||
modePlayedTime = float(pulseParse("gamemodesSeparated", mapName.slice(3), modeName, "kills"))
|
||||
if ( modePlayedTime > 0 ) {
|
||||
AddPieChartEntry( modes, GameMode_GetName( modeName ), modePlayedTime, GetGameModeDisplayColor( modeName ) )
|
||||
}
|
||||
} else {
|
||||
pulsePrintt("No " + mapName.slice(3) + " in pulseData")
|
||||
}
|
||||
}
|
||||
foreach (string key, array<int> value in customGamemodeList)
|
||||
{
|
||||
if (mapName in pulseData["gamemodesSeparated"])
|
||||
if (mapName.slice(3) in pulseData["gamemodesSeparated"])
|
||||
{
|
||||
float modePlayedTime = 0
|
||||
modePlayedTime = float(pulseParse("gamemodesSeparated", mapName, key, "kills"))
|
||||
modePlayedTime = float(pulseParse("gamemodesSeparated", mapName.slice(3), key, "kills"))
|
||||
if ( modePlayedTime > 0 ) {
|
||||
AddPieChartEntry( modes, customGamemodeNames[key], modePlayedTime, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user