make workinprogress crime 2 digit precision

This commit is contained in:
Olivier Gagnon 2022-07-07 02:03:02 -04:00
parent 3ee7d593d0
commit 24b6eb4d56
2 changed files with 5 additions and 1 deletions

@ -1206,6 +1206,10 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript
_ctx.log(() => txt);
}
if (player.currentWork !== null) {
player.finishNEWWork(true);
}
// Set Location to slums
player.gotoLocation(LocationName.Slums);

@ -149,7 +149,7 @@ export function WorkInProgressRoot(): React.ReactElement {
if (player.currentWork !== null) {
if (isCrimeWork(player.currentWork)) {
const crime = player.currentWork.getCrime();
const completion = Math.round(((player.currentWork.cyclesWorked * CONSTANTS._idleSpeed) / crime.time) * 100);
const completion = ((player.currentWork.cyclesWorked * CONSTANTS._idleSpeed) / crime.time) * 100;
workInfo = {
buttons: {