Add clearer gamemode names to "Maps" and "Time"

This commit is contained in:
okvdai
2023-05-14 13:48:49 +02:00
parent 550c899323
commit 240a07d9fa
2 changed files with 12 additions and 2 deletions
+6 -1
View File
@@ -185,6 +185,11 @@ void function UpdateStatsForMap( string mapName )
fw = [147, 204, 57, 255],
gg = [14, 87, 132, 255]
}
table< string, string > customGamemodeNames = {
sns = "Sticks and Stones"
fw = "Frontier War"
gg = "Gun Game"
}
for ( int modeId = 0; modeId < enumCount; modeId++ )
{
string modeName = PersistenceGetEnumItemNameForIndex( "gameModes", modeId )
@@ -204,7 +209,7 @@ void function UpdateStatsForMap( string mapName )
float modePlayedTime = 0
modePlayedTime = float(globalToneAPIGamemodeMapData[mapName][key])
if ( modePlayedTime > 0 ) {
AddPieChartEntry( modes, key, modePlayedTime, value)
AddPieChartEntry( modes, customGamemodeNames[key], modePlayedTime, value)
}
}
}
+6 -1
View File
@@ -152,6 +152,11 @@ void function UpdateViewStatsTimeMenu()
fw = [147, 204, 57, 255],
gg = [14, 87, 132, 255]
}
table< string, string > customGamemodeNames = {
sns = "Sticks and Stones"
fw = "Frontier War"
gg = "Gun Game"
}
for ( int modeId = 0; modeId < enumCount; modeId++ )
{
string modeName = PersistenceGetEnumItemNameForIndex( "gameModes", modeId )
@@ -171,7 +176,7 @@ void function UpdateViewStatsTimeMenu()
float modePlayedTime = 0
modePlayedTime = float(getFromToneAPI(key, "gamemodes", "kills"))
if ( modePlayedTime > 0 ) {
AddPieChartEntry( modes, key, modePlayedTime, value)
AddPieChartEntry( modes, customGamemodeNames[key], modePlayedTime, value)
}
}
}