BUGFIX: Correctly show remaining grafting/programming time left when cycles are skipped. (#1510)

This commit is contained in:
Tom Prince 2024-07-26 03:05:29 -06:00 committed by GitHub
parent c3dc275d34
commit 1e6e635ae3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

@ -64,8 +64,8 @@ export class CreateProgramWork extends Work {
skillMult *= focusBonus;
//Skill multiplier directly applied to "time worked"
this.cyclesWorked += cycles;
this.unitRate = CONSTANTS.MilliPerCycle * cycles * skillMult;
this.unitCompleted += this.unitRate;
this.unitRate = CONSTANTS.MilliPerCycle * skillMult;
this.unitCompleted += this.unitRate * cycles;
if (this.unitCompleted >= this.unitNeeded()) {
return true;

@ -49,8 +49,8 @@ export class GraftingWork extends Work {
process(cycles: number): boolean {
const focusBonus = Player.focusPenalty();
this.cyclesWorked += cycles;
this.unitRate = CONSTANTS.MilliPerCycle * cycles * graftingIntBonus() * focusBonus;
this.unitCompleted += this.unitRate;
this.unitRate = CONSTANTS.MilliPerCycle * graftingIntBonus() * focusBonus;
this.unitCompleted += this.unitRate * cycles;
return this.unitCompleted >= this.unitNeeded();
}