bitburner-src/src/PersonObjects/Player/PlayerObjectBladeburnerMethods.ts

22 lines
596 B
TypeScript
Raw Normal View History

import { Bladeburner } from "../../Bladeburner/Bladeburner";
2021-09-23 19:30:13 +02:00
import { IPlayer } from "../IPlayer";
2019-04-04 02:08:11 +02:00
2021-09-25 08:36:49 +02:00
export function canAccessBladeburner(this: IPlayer): boolean {
2021-09-05 01:09:30 +02:00
if (this.bitNodeN === 8) {
return false;
}
2022-04-14 07:22:50 +02:00
return this.bitNodeN === 6 || this.bitNodeN === 7 || this.sourceFileLvl(6) > 0 || this.sourceFileLvl(7) > 0;
2019-04-04 02:08:11 +02:00
}
2021-09-23 19:30:13 +02:00
export function inBladeburner(this: IPlayer): boolean {
2021-09-05 01:09:30 +02:00
if (this.bladeburner == null) {
return false;
}
return this.bladeburner instanceof Bladeburner;
2019-04-04 02:08:11 +02:00
}
2021-09-23 19:30:13 +02:00
export function startBladeburner(this: IPlayer): void {
2021-09-05 01:09:30 +02:00
this.bladeburner = new Bladeburner(this);
2019-04-04 02:08:11 +02:00
}