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:
@@ -3,20 +3,20 @@ import {
|
||||
CorporationUnlockUpgradeIndex,
|
||||
CorporationUnlockUpgrades,
|
||||
} from "../../Corporation/data/CorporationUnlockUpgrades";
|
||||
import { IPlayer } from "../IPlayer";
|
||||
import { PlayerObject } from "./PlayerObject";
|
||||
|
||||
export function canAccessCorporation(this: IPlayer): boolean {
|
||||
export function canAccessCorporation(this: PlayerObject): boolean {
|
||||
return this.bitNodeN === 3 || this.sourceFileLvl(3) > 0;
|
||||
}
|
||||
|
||||
export function hasCorporation(this: IPlayer): boolean {
|
||||
export function hasCorporation(this: PlayerObject): boolean {
|
||||
if (this.corporation == null) {
|
||||
return false;
|
||||
}
|
||||
return this.corporation instanceof Corporation;
|
||||
}
|
||||
|
||||
export function startCorporation(this: IPlayer, corpName: string, additionalShares = 0): void {
|
||||
export function startCorporation(this: PlayerObject, corpName: string, additionalShares = 0): void {
|
||||
this.corporation = new Corporation({
|
||||
name: corpName,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user