mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
crime consume all their time at once
This commit is contained in:
2
dist/main.bundle.js
vendored
2
dist/main.bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/main.bundle.js.map
vendored
2
dist/main.bundle.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -35,7 +35,7 @@ export class CrimeWork extends Work {
|
||||
this.cyclesWorked += cycles;
|
||||
const time = Object.values(Crimes).find((c) => c.type === this.crimeType)?.time ?? 0;
|
||||
this.unitCompleted += CONSTANTS._idleSpeed * cycles;
|
||||
if (this.unitCompleted >= time) {
|
||||
while (this.unitCompleted >= time) {
|
||||
this.commit(player);
|
||||
this.unitCompleted -= time;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user