bitburner-src/src/SourceFile/SourceFile.ts

22 lines
526 B
TypeScript
Raw Normal View History

import { BitNodes } from "../BitNode/BitNode";
export class SourceFile {
info: string;
2021-04-30 05:52:56 +02:00
lvl = 1;
n: number;
name: string;
2021-04-30 05:52:56 +02:00
owned = false;
2021-04-30 05:52:56 +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");
}
this.n = number;
this.name = `Source-File ${number}: ${bitnode.name}`
this.info = info;
}
}