bitburner-src/src/SourceFile/SourceFile.ts

22 lines
481 B
TypeScript
Raw Normal View History

import { BitNodes } from "../BitNode/BitNode";
export class SourceFile {
2021-09-05 01:09:30 +02:00
info: string;
lvl = 1;
n: number;
name: string;
owned = false;
2021-09-05 01:09:30 +02:00
constructor(number: number, info = "") {
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;
}
}