mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-08 16:47:49 +02:00
build fix, lint, remove some instanceof checks
This commit is contained in:
@@ -24,7 +24,6 @@ import { Contracts } from "../../Bladeburner/data/Contracts";
|
||||
|
||||
import { CONSTANTS } from "../../Constants";
|
||||
|
||||
import { Faction } from "../../Faction/Faction";
|
||||
import { Factions } from "../../Faction/Factions";
|
||||
|
||||
import { CityName } from "../../Locations/data/CityNames";
|
||||
@@ -307,7 +306,7 @@ export class Sleeve extends Person {
|
||||
* Returns boolean indicating success
|
||||
*/
|
||||
workForCompany(companyName: string): boolean {
|
||||
if (!(Companies[companyName] instanceof Company) || Player.jobs[companyName] == null) {
|
||||
if (!Companies[companyName] || Player.jobs[companyName] == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -327,7 +326,7 @@ export class Sleeve extends Person {
|
||||
*/
|
||||
workForFaction(factionName: string, workType: string): boolean {
|
||||
const faction = Factions[factionName];
|
||||
if (factionName === "" || !faction || !(faction instanceof Faction) || !Player.factions.includes(factionName)) {
|
||||
if (factionName === "" || !faction || !Player.factions.includes(factionName)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ export function findPurchasableAugs(this: Sleeve): Augmentation[] {
|
||||
|
||||
// If player is in a gang, then we return all augs that the player
|
||||
// has enough reputation for (since that gang offers all augs)
|
||||
if (Player.inGang()) {
|
||||
if (Player.gang) {
|
||||
const fac = Player.getGangFaction();
|
||||
const gangAugs = getFactionAugmentationsFiltered(fac);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user