build fix, lint, remove some instanceof checks

This commit is contained in:
Snarling
2022-09-27 15:14:34 -04:00
parent 81412db02e
commit 38063f62a7
38 changed files with 131 additions and 282 deletions
+2 -3
View File
@@ -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;
}
+1 -1
View File
@@ -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);