From 240a07d9fa138c738aabef40936db1349b94e8fc Mon Sep 17 00:00:00 2001 From: okvdai <108829133+okvdai@users.noreply.github.com> Date: Sun, 14 May 2023 13:48:49 +0200 Subject: [PATCH] Add clearer gamemode names to "Maps" and "Time" --- mod/scripts/vscripts/ui/menu_stats_maps.nut | 7 ++++++- mod/scripts/vscripts/ui/menu_stats_time.nut | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/mod/scripts/vscripts/ui/menu_stats_maps.nut b/mod/scripts/vscripts/ui/menu_stats_maps.nut index 9777e1f..49d72b4 100644 --- a/mod/scripts/vscripts/ui/menu_stats_maps.nut +++ b/mod/scripts/vscripts/ui/menu_stats_maps.nut @@ -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) } } } diff --git a/mod/scripts/vscripts/ui/menu_stats_time.nut b/mod/scripts/vscripts/ui/menu_stats_time.nut index 1bd3f2a..3030481 100644 --- a/mod/scripts/vscripts/ui/menu_stats_time.nut +++ b/mod/scripts/vscripts/ui/menu_stats_time.nut @@ -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) } } }