mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 02:32:55 +02:00
Playtesting - Fixed some bugs, refactoring
This commit is contained in:
@@ -645,6 +645,7 @@ var Engine = {
|
||||
updateHackProgress: function(numCycles = 1) {
|
||||
var timeElapsedMilli = numCycles * Engine._idleSpeed;
|
||||
Engine._actionTimeLeft -= (timeElapsedMilli/ 1000); //Substract idle speed (ms)
|
||||
Engine._actionTimeLeft = Math.max(Engine._actionTimeLeft, 0);
|
||||
|
||||
//Calculate percent filled
|
||||
var percent = Math.round((1 - Engine._actionTimeLeft / Engine._totalActionTime) * 100);
|
||||
|
||||
Reference in New Issue
Block a user