mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-08 08:43:53 +01:00
BUGFIX: Correctly show remaining grafting/programming time left when cycles are skipped. (#1510)
This commit is contained in:
parent
c3dc275d34
commit
1e6e635ae3
@ -64,8 +64,8 @@ export class CreateProgramWork extends Work {
|
|||||||
skillMult *= focusBonus;
|
skillMult *= focusBonus;
|
||||||
//Skill multiplier directly applied to "time worked"
|
//Skill multiplier directly applied to "time worked"
|
||||||
this.cyclesWorked += cycles;
|
this.cyclesWorked += cycles;
|
||||||
this.unitRate = CONSTANTS.MilliPerCycle * cycles * skillMult;
|
this.unitRate = CONSTANTS.MilliPerCycle * skillMult;
|
||||||
this.unitCompleted += this.unitRate;
|
this.unitCompleted += this.unitRate * cycles;
|
||||||
|
|
||||||
if (this.unitCompleted >= this.unitNeeded()) {
|
if (this.unitCompleted >= this.unitNeeded()) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -49,8 +49,8 @@ export class GraftingWork extends Work {
|
|||||||
process(cycles: number): boolean {
|
process(cycles: number): boolean {
|
||||||
const focusBonus = Player.focusPenalty();
|
const focusBonus = Player.focusPenalty();
|
||||||
this.cyclesWorked += cycles;
|
this.cyclesWorked += cycles;
|
||||||
this.unitRate = CONSTANTS.MilliPerCycle * cycles * graftingIntBonus() * focusBonus;
|
this.unitRate = CONSTANTS.MilliPerCycle * graftingIntBonus() * focusBonus;
|
||||||
this.unitCompleted += this.unitRate;
|
this.unitCompleted += this.unitRate * cycles;
|
||||||
return this.unitCompleted >= this.unitNeeded();
|
return this.unitCompleted >= this.unitNeeded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user