forked from profectus/Profectus
Made offline time build up when paused
This commit is contained in:
parent
1017735fdf
commit
8103377ab0
1 changed files with 3 additions and 1 deletions
|
@ -119,10 +119,12 @@ function update() {
|
|||
if (player.offTime.remain > modInfo.offlineLimit * 3600) {
|
||||
player.offTime.remain = modInfo.offlineLimit * 3600;
|
||||
}
|
||||
if (player.offTime.remain > 0) {
|
||||
if (player.offTime.remain > 0 && player.devSpeed !== 0) {
|
||||
let offlineDiff = Math.max(player.offTime.remain / 10, diff);
|
||||
player.offTime.remain -= offlineDiff;
|
||||
diff = diff.add(offlineDiff);
|
||||
} else if (player.devSpeed === 0) {
|
||||
player.offTime.remain += diff.toNumber();
|
||||
}
|
||||
if (!player.offlineProd || player.offTime.remain <= 0) {
|
||||
player.offTime = undefined;
|
||||
|
|
Loading…
Reference in a new issue