Private
Public Access
1
0

fix: Economy is calculated server-side and not browser-side anymore

This commit is contained in:
gauvainboiche
2026-03-31 09:40:00 +02:00
parent 90000fae2f
commit 5871427514
5 changed files with 177 additions and 5 deletions

View File

@@ -7,12 +7,10 @@ import {
fetchGridForSeed,
fetchAndApplyScores,
updateEconomyDisplay,
tickEconScore,
loadEconScores,
loadVictoryPoints,
loadDbInfo,
loadElementBonus,
tickElementBonus,
refreshFromServer,
refreshGridDisplay,
loadPlayfieldMask,
@@ -61,8 +59,8 @@ function scheduleScorePoll() {
clearTimeout(scorePollTimer);
scorePollTimer = window.setTimeout(async () => {
await fetchAndApplyScores();
tickEconScore(ECON_TICK_SECONDS);
tickElementBonus();
await loadEconScores();
await loadElementBonus();
scheduleScorePoll();
}, ECON_TICK_SECONDS * 1_000);
}