bitburner-src/src/SourceFile/SourceFile.ts
2021-09-25 01:06:17 -04:00

22 lines
494 B
TypeScript

import { BitNodes } from "../BitNode/BitNode";
export class SourceFile {
info: JSX.Element;
lvl = 1;
n: number;
name: string;
owned = false;
constructor(number: number, info: JSX.Element) {
const bitnodeKey = "BitNode" + number;
const bitnode = BitNodes[bitnodeKey];
if (bitnode == null) {
throw new Error("Invalid Bit Node for this Source File");
}
this.n = number;
this.name = `Source-File ${number}: ${bitnode.name}`;
this.info = info;
}
}