convert some files to ts

This commit is contained in:
Olivier Gagnon
2021-09-23 13:30:13 -04:00
parent cdd9c174e7
commit 8fd6b2e7da
3 changed files with 16 additions and 12 deletions

View 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);
}