bitburner-src/src/SourceFile/SourceFile.ts

22 lines
494 B
TypeScript
Raw Normal View History

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