2021-08-17 00:43:55 +02:00
|
|
|
import { Bladeburner } from "../../Bladeburner/Bladeburner";
|
2019-04-04 02:08:11 +02:00
|
|
|
import { SourceFileFlags } from "../../SourceFile/SourceFileFlags";
|
2021-09-23 19:30:13 +02:00
|
|
|
import { IPlayer } from "../IPlayer";
|
2019-04-04 02:08:11 +02:00
|
|
|
|
2021-09-23 19:30:13 +02:00
|
|
|
export function canAccessBladeburner(this: IPlayer) {
|
2021-09-05 01:09:30 +02:00
|
|
|
if (this.bitNodeN === 8) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2021-09-09 05:47:34 +02:00
|
|
|
return this.bitNodeN === 6 || this.bitNodeN === 7 || SourceFileFlags[6] > 0 || SourceFileFlags[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
|
|
|
}
|