mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-11 10:13:52 +01:00
18 lines
666 B
TypeScript
18 lines
666 B
TypeScript
// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts
|
|
import { companyPositionMetadata } from "./data/CompanyPositionsMetadata";
|
|
import { CompanyPosition, IConstructorParams } from "./CompanyPosition";
|
|
import { IMap } from "../types";
|
|
|
|
export const CompanyPositions: IMap<CompanyPosition> = {};
|
|
|
|
function addCompanyPosition(params: IConstructorParams) {
|
|
if (CompanyPositions[params.name] != null) {
|
|
console.warn(`Duplicate Company Position being defined: ${params.name}`);
|
|
}
|
|
CompanyPositions[params.name] = new CompanyPosition(params);
|
|
}
|
|
|
|
companyPositionMetadata.forEach((e) => {
|
|
addCompanyPosition(e);
|
|
});
|