From ef304dedb9f467c6805cad6f8acd7f480b259011 Mon Sep 17 00:00:00 2001 From: Simon Marsh Date: Tue, 4 Apr 2023 08:29:57 +0100 Subject: [PATCH] Fix bug in serviceBonus triggered when hitting file sharing level. --- src/model/bandwidth.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model/bandwidth.js b/src/model/bandwidth.js index 9e57823..b7755a8 100644 --- a/src/model/bandwidth.js +++ b/src/model/bandwidth.js @@ -56,14 +56,14 @@ export class Bandwidth { if (state.levels[i].unlocked) { let multiplier = state.ui.elapsed - state.levels[i].unlockTime // multiplier = multiplier > 7200 ? 7200 : multiplier - bonus += (this.rate * BigInt(multiplier)) / BigInt(7200 / i) + bonus += (this.rate * BigInt(multiplier)) / BigInt(Math.floor(7200 / i)) break } } if (state.services.time.level > 1) { //let multiplier = state.ui.elapsed > 172800 ? 86400 : state.ui.elapsed let multiplier = state.ui.elapsed - bonus += (this.rate * BigInt(multiplier)) / BigInt(86400/i) + bonus += (this.rate * BigInt(multiplier)) / BigInt(Math.floor(86400/i)) } }