Sleeves now only get actual gang's augs

This commit is contained in:
Mughur 2022-09-23 15:52:04 +03:00
parent 33b304bff5
commit a389974314

@ -2,12 +2,14 @@ import { FactionNames } from "../../Faction/data/FactionNames";
import { Sleeve } from "./Sleeve";
import { IPlayer } from "../IPlayer";
import { Player } from "../../Player";
import { Augmentation } from "../../Augmentation/Augmentation";
import { StaticAugmentations } from "../../Augmentation/StaticAugmentations";
import { Faction } from "../../Faction/Faction";
import { Factions } from "../../Faction/Factions";
import { Multipliers } from "../Multipliers";
import { getFactionAugmentationsFiltered } from "../../Faction/FactionHelpers";
export function findSleevePurchasableAugs(sleeve: Sleeve, p: IPlayer): Augmentation[] {
// You can only purchase Augmentations that are actually available from
@ -65,8 +67,9 @@ export function findSleevePurchasableAugs(sleeve: Sleeve, p: IPlayer): Augmentat
// has enough reputation for (since that gang offers all augs)
if (p.inGang()) {
const fac = p.getGangFaction();
const gangAugs = getFactionAugmentationsFiltered(Player, fac);
for (const augName of Object.keys(StaticAugmentations)) {
for (const augName of gangAugs) {
const aug = StaticAugmentations[augName];
if (!isAvailableForSleeve(aug)) {
continue;