mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
Remove IPlayer interface
Use PlayerObject instead when referring to the type of "The Player."
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import { Bladeburner } from "../../Bladeburner/Bladeburner";
|
||||
import { IPlayer } from "../IPlayer";
|
||||
import { PlayerObject } from "./PlayerObject";
|
||||
|
||||
export function canAccessBladeburner(this: IPlayer): boolean {
|
||||
export function canAccessBladeburner(this: PlayerObject): boolean {
|
||||
return this.bitNodeN === 6 || this.bitNodeN === 7 || this.sourceFileLvl(6) > 0 || this.sourceFileLvl(7) > 0;
|
||||
}
|
||||
|
||||
export function inBladeburner(this: IPlayer): boolean {
|
||||
export function inBladeburner(this: PlayerObject): boolean {
|
||||
if (this.bladeburner == null) {
|
||||
return false;
|
||||
}
|
||||
return this.bladeburner instanceof Bladeburner;
|
||||
}
|
||||
|
||||
export function startBladeburner(this: IPlayer): void {
|
||||
export function startBladeburner(this: PlayerObject): void {
|
||||
this.bladeburner = new Bladeburner();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user