diff --git a/src/views/Game/PlayerView.vue b/src/views/Game/PlayerView.vue index 2dc1a5c..87ae97c 100644 --- a/src/views/Game/PlayerView.vue +++ b/src/views/Game/PlayerView.vue @@ -188,14 +188,6 @@ function returnNumber(stat, profile) { return profile.stats[stat.key]; } -function formatNumber(number, tenth) { - if (!tenth) { - return number / 100; - } else { - return number / 10; - } -} - function formatProfile(profile) { if (profile.stats) { if (profile.stats.first_play_timestamp) { @@ -217,6 +209,45 @@ function formatProfile(profile) { return profile; } + +function formatCounts(profile) { + const stats = profile.stats[`count_${versionForm.currentVersion}`]; + + return stats + ? [ + stats.mfc != null + ? { + label: "MFCs", + value: stats.mfc, + } + : 0, + stats.pfc != null + ? { + label: "PFCs", + value: stats.pfc, + } + : 0, + stats.fc != null + ? { + label: "GFCs", + value: stats.fc, + } + : 0, + stats.gfc != null + ? { + label: "FCs", + value: stats.gfc, + } + : 0, + stats.life4 != null + ? { + label: "Life-4 Clears", + value: stats.life4, + } + : 0, + ] + : []; +}