bitburner-src/src/Corporation/Research.ts

58 lines
1.6 KiB
TypeScript
Raw Normal View History

import { CorpResearchName } from "@nsdefs";
export interface ResearchParams {
name: CorpResearchName;
2021-09-05 01:09:30 +02:00
cost: number;
desc: string;
advertisingMult?: number;
employeeChaMult?: number;
employeeCreMult?: number;
employeeEffMult?: number;
employeeIntMult?: number;
productionMult?: number;
productProductionMult?: number;
salesMult?: number;
sciResearchMult?: number;
storageMult?: number;
}
export class Research {
2021-09-05 01:09:30 +02:00
// Name of research. This will be used to identify researches in the Research Tree
name: CorpResearchName = "AutoBrew";
2021-09-05 01:09:30 +02:00
// How much scientific research it costs to unlock this
cost = 0;
2021-09-05 01:09:30 +02:00
// Description of what the Research does
description = "";
2021-09-05 01:09:30 +02:00
// All possible generic upgrades for the company, in the form of multipliers
advertisingMult = 1;
employeeChaMult = 1;
employeeCreMult = 1;
employeeEffMult = 1;
employeeIntMult = 1;
productionMult = 1;
productProductionMult = 1;
salesMult = 1;
sciResearchMult = 1;
storageMult = 1;
constructor(p: ResearchParams | null = null) {
if (!p) return;
2021-09-05 01:09:30 +02:00
this.name = p.name;
this.cost = p.cost;
this.description = p.desc;
this.advertisingMult = p.advertisingMult ?? 1;
this.employeeChaMult = p.employeeChaMult ?? 1;
this.employeeCreMult = p.employeeCreMult ?? 1;
this.employeeEffMult = p.employeeEffMult ?? 1;
this.employeeIntMult = p.employeeIntMult ?? 1;
this.productionMult = p.productionMult ?? 1;
this.productProductionMult = p.productProductionMult ?? 1;
this.salesMult = p.salesMult ?? 1;
this.sciResearchMult = p.sciResearchMult ?? 1;
this.storageMult = p.storageMult ?? 1;
2021-09-05 01:09:30 +02:00
}
}