UI: change time elapsed to time remaining for programs and grafting (#1328)

This commit is contained in:
TheAimMan
2024-06-02 23:51:21 -04:00
committed by GitHub
parent d9f04203cf
commit e622b9b904
3 changed files with 13 additions and 8 deletions
+4 -2
View File
@@ -21,10 +21,11 @@ export class CreateProgramWork extends Work {
programName: CompletedProgramName;
// amount of effective work completed on the program (time boosted by skills).
unitCompleted: number;
unitRate: number;
constructor(params?: CreateProgramWorkParams) {
super(WorkType.CREATE_PROGRAM, params?.singularity ?? true);
this.unitCompleted = 0;
this.unitRate = 0;
this.programName = params?.programName ?? CompletedProgramName.bruteSsh;
if (params) {
@@ -63,7 +64,8 @@ export class CreateProgramWork extends Work {
skillMult *= focusBonus;
//Skill multiplier directly applied to "time worked"
this.cyclesWorked += cycles;
this.unitCompleted += CONSTANTS.MilliPerCycle * cycles * skillMult;
this.unitRate = CONSTANTS.MilliPerCycle * cycles * skillMult;
this.unitCompleted += this.unitRate;
if (this.unitCompleted >= this.unitNeeded()) {
return true;