Refactor WorkType to an enum

This commit is contained in:
nickofolas
2022-05-04 13:42:48 -05:00
parent cc5e89208e
commit 4a8e99b170
10 changed files with 94 additions and 84 deletions
+3 -2
View File
@@ -30,6 +30,7 @@ import { WorkerScript } from "../Netscript/WorkerScript";
import { HacknetServer } from "../Hacknet/HacknetServer";
import { ISkillProgress } from "./formulas/skill";
import { PlayerAchievement } from "../Achievements/Achievements";
import { WorkType } from "../utils/WorkType";
export interface IPlayer {
// Class members
@@ -137,7 +138,7 @@ export interface IPlayer {
focus: boolean;
className: string;
currentWorkFactionName: string;
workType: string;
workType: WorkType | null;
workCostMult: number;
workExpMult: number;
currentWorkFactionDescription: string;
@@ -269,7 +270,7 @@ export interface IPlayer {
prestigeSourceFile(): void;
calculateSkill(exp: number, mult?: number): number;
calculateSkillProgress(exp: number, mult?: number): ISkillProgress;
resetWorkStatus(generalType?: string, group?: string, workType?: string): void;
resetWorkStatus(generalType?: WorkType, group?: string, workType?: string): void;
getWorkHackExpGain(): number;
getWorkStrExpGain(): number;
getWorkDefExpGain(): number;