mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
convert a few variables to const.
This commit is contained in:
parent
1fbb971d6f
commit
5c92360310
@ -608,9 +608,9 @@ const Engine = {
|
||||
// Main Game Loop
|
||||
idleTimer: function() {
|
||||
// Get time difference
|
||||
var _thisUpdate = new Date().getTime();
|
||||
var diff = _thisUpdate - Engine._lastUpdate;
|
||||
var offset = diff % Engine._idleSpeed;
|
||||
const _thisUpdate = new Date().getTime();
|
||||
let diff = _thisUpdate - Engine._lastUpdate;
|
||||
const offset = diff % Engine._idleSpeed;
|
||||
|
||||
// Divide this by cycle time to determine how many cycles have elapsed since last update
|
||||
diff = Math.floor(diff / Engine._idleSpeed);
|
||||
@ -626,7 +626,7 @@ const Engine = {
|
||||
},
|
||||
|
||||
updateGame: function(numCycles = 1) {
|
||||
var time = numCycles * Engine._idleSpeed;
|
||||
const time = numCycles * Engine._idleSpeed;
|
||||
if (Player.totalPlaytime == null) {Player.totalPlaytime = 0;}
|
||||
if (Player.playtimeSinceLastAug == null) {Player.playtimeSinceLastAug = 0;}
|
||||
if (Player.playtimeSinceLastBitnode == null) {Player.playtimeSinceLastBitnode = 0;}
|
||||
|
Loading…
Reference in New Issue
Block a user