mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 08:42:53 +02:00
UI: change time elapsed to time remaining for programs and grafting (#1328)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user