2018-12-14 04:24:08 +01:00
|
|
|
export interface IConstructorParams {
|
|
|
|
name: string;
|
|
|
|
cost: number;
|
|
|
|
desc: string;
|
|
|
|
advertisingMult?: number;
|
|
|
|
employeeChaMult?: number;
|
2018-12-16 04:47:15 +01:00
|
|
|
employeeCreMult?: number;
|
2018-12-14 04:24:08 +01:00
|
|
|
employeeEffMult?: number;
|
|
|
|
employeeIntMult?: number;
|
|
|
|
productionMult?: number;
|
2019-03-13 23:17:30 +01:00
|
|
|
productProductionMult?: number;
|
2018-12-14 04:24:08 +01:00
|
|
|
salesMult?: number;
|
|
|
|
sciResearchMult?: number;
|
|
|
|
storageMult?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Research {
|
|
|
|
// Name of research. This will be used to identify researches in the Research Tree
|
2021-04-30 05:52:56 +02:00
|
|
|
name = "";
|
2018-12-14 04:24:08 +01:00
|
|
|
|
|
|
|
// How much scientific research it costs to unlock this
|
2021-04-30 05:52:56 +02:00
|
|
|
cost = 0;
|
2018-12-14 04:24:08 +01:00
|
|
|
|
|
|
|
// Description of what the Research does
|
2021-04-30 05:52:56 +02:00
|
|
|
desc = "";
|
2018-12-14 04:24:08 +01:00
|
|
|
|
|
|
|
// All possible generic upgrades for the company, in the form of multipliers
|
2021-04-30 05:52:56 +02:00
|
|
|
advertisingMult = 1;
|
|
|
|
employeeChaMult = 1;
|
|
|
|
employeeCreMult = 1;
|
|
|
|
employeeEffMult = 1;
|
|
|
|
employeeIntMult = 1;
|
|
|
|
productionMult = 1;
|
|
|
|
productProductionMult = 1;
|
|
|
|
salesMult = 1;
|
|
|
|
sciResearchMult = 1;
|
|
|
|
storageMult = 1;
|
2018-12-14 04:24:08 +01:00
|
|
|
|
|
|
|
constructor(p: IConstructorParams={name: "", cost: 0, desc: ""}) {
|
|
|
|
this.name = p.name;
|
|
|
|
this.cost = p.cost;
|
|
|
|
this.desc = p.desc;
|
2019-03-13 23:17:30 +01:00
|
|
|
if (p.advertisingMult) { this.advertisingMult = p.advertisingMult; }
|
|
|
|
if (p.employeeChaMult) { this.employeeChaMult = p.employeeChaMult; }
|
|
|
|
if (p.employeeCreMult) { this.employeeCreMult = p.employeeCreMult; }
|
|
|
|
if (p.employeeEffMult) { this.employeeEffMult = p.employeeEffMult; }
|
|
|
|
if (p.employeeIntMult) { this.employeeIntMult = p.employeeIntMult; }
|
|
|
|
if (p.productionMult) { this.productionMult = p.productionMult; }
|
|
|
|
if (p.productProductionMult) { this.productProductionMult = p.productProductionMult; }
|
|
|
|
if (p.salesMult) { this.salesMult = p.salesMult; }
|
|
|
|
if (p.sciResearchMult) { this.sciResearchMult = p.sciResearchMult; }
|
|
|
|
if (p.storageMult) { this.storageMult = p.storageMult; }
|
2018-12-14 04:24:08 +01:00
|
|
|
}
|
|
|
|
}
|