mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-11 10:13:52 +01:00
19 lines
599 B
TypeScript
19 lines
599 B
TypeScript
// The Research Map is an object that holds all Corporation Research objects
|
|
// as values. They are identified by their names
|
|
import { Research, IConstructorParams } from "./Research";
|
|
import { researchMetadata } from "./data/ResearchMetadata";
|
|
import { IMap } from "../types";
|
|
|
|
export const ResearchMap: IMap<Research> = {};
|
|
|
|
function addResearch(p: IConstructorParams): void {
|
|
if (ResearchMap[p.name] != null) {
|
|
console.warn(`Duplicate Research being defined: ${p.name}`);
|
|
}
|
|
ResearchMap[p.name] = new Research(p);
|
|
}
|
|
|
|
for (const metadata of researchMetadata) {
|
|
addResearch(metadata);
|
|
}
|