From 1a03a003212909e55c1fefff78d13bfa71906662 Mon Sep 17 00:00:00 2001 From: Acamaeda Date: Thu, 1 Oct 2020 21:59:41 -0400 Subject: [PATCH] Added a configurable offline time limit, default 1 hour --- js/game.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/game.js b/js/game.js index 134c052..4009268 100644 --- a/js/game.js +++ b/js/game.js @@ -673,6 +673,7 @@ var interval = setInterval(function() { let now = Date.now() let diff = (now - player.time) / 1e3 if (player.offTime !== undefined) { + if (player.offTime.remain > modInfo.offlineLimit * 3600000) player.offlineTime.remain = modInfo.offlineLimit * 3600000 if (player.offTime.remain > 0) { let offlineDiff = Math.max(player.offTime.remain / 10, diff) player.offTime.remain -= offlineDiff