mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 05:33:54 +01:00
crime consume all their time at once
This commit is contained in:
parent
e55a3f39d4
commit
e9254edf5d
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user