From c6c91b84fe7736d6b3c652eee64ee33faa12a0d1 Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Tue, 2 Apr 2024 06:26:18 -0400 Subject: [PATCH] [F] Fix wacca rating calculation --- AquaNet/src/pages/UserHome.svelte | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/AquaNet/src/pages/UserHome.svelte b/AquaNet/src/pages/UserHome.svelte index 2ddcf4db..d9d16fe3 100644 --- a/AquaNet/src/pages/UserHome.svelte +++ b/AquaNet/src/pages/UserHome.svelte @@ -63,6 +63,16 @@ console.log(trend) console.log(games) + // If game is wacca, divide all ratings by 10 + if (game === 'wacca') { + user.rating /= 10 + trend.forEach(it => it.rating /= 10) + user.recent.forEach(it => { + it.beforeRating /= 10 + it.afterRating /= 10 + }) + } + const minDate = moment().subtract(TREND_DAYS, 'days').format("YYYY-MM-DD") d = {user, trend: trend.filter(it => it.date >= minDate && it.plays != 0), @@ -226,15 +236,15 @@