mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
convert some files to ts
This commit is contained in:
22
src/PersonObjects/Player/PlayerObjectBladeburnerMethods.ts
Normal file
22
src/PersonObjects/Player/PlayerObjectBladeburnerMethods.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Bladeburner } from "../../Bladeburner/Bladeburner";
|
||||
import { SourceFileFlags } from "../../SourceFile/SourceFileFlags";
|
||||
import { IPlayer } from "../IPlayer";
|
||||
|
||||
export function canAccessBladeburner(this: IPlayer) {
|
||||
if (this.bitNodeN === 8) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return this.bitNodeN === 6 || this.bitNodeN === 7 || SourceFileFlags[6] > 0 || SourceFileFlags[7] > 0;
|
||||
}
|
||||
|
||||
export function inBladeburner(this: IPlayer): boolean {
|
||||
if (this.bladeburner == null) {
|
||||
return false;
|
||||
}
|
||||
return this.bladeburner instanceof Bladeburner;
|
||||
}
|
||||
|
||||
export function startBladeburner(this: IPlayer): void {
|
||||
this.bladeburner = new Bladeburner(this);
|
||||
}
|
||||
Reference in New Issue
Block a user