mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 23:08:36 +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;
|
this.cyclesWorked += cycles;
|
||||||
const time = Object.values(Crimes).find((c) => c.type === this.crimeType)?.time ?? 0;
|
const time = Object.values(Crimes).find((c) => c.type === this.crimeType)?.time ?? 0;
|
||||||
this.unitCompleted += CONSTANTS._idleSpeed * cycles;
|
this.unitCompleted += CONSTANTS._idleSpeed * cycles;
|
||||||
if (this.unitCompleted >= time) {
|
while (this.unitCompleted >= time) {
|
||||||
this.commit(player);
|
this.commit(player);
|
||||||
this.unitCompleted -= time;
|
this.unitCompleted -= time;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user