feat: handle classic syndicate alignments when trading in medals
This commit is contained in:
parent
c23eac5c87
commit
521a8998bc
@ -1203,7 +1203,8 @@ export const addStanding = (
|
|||||||
syndicateTag: string,
|
syndicateTag: string,
|
||||||
gainedStanding: number,
|
gainedStanding: number,
|
||||||
affiliationMods: IAffiliationMods[] = [],
|
affiliationMods: IAffiliationMods[] = [],
|
||||||
isMedallion: boolean = false
|
isMedallion: boolean = false,
|
||||||
|
propagateAlignments: boolean = true
|
||||||
): void => {
|
): void => {
|
||||||
let syndicate = inventory.Affiliations.find(x => x.Tag == syndicateTag);
|
let syndicate = inventory.Affiliations.find(x => x.Tag == syndicateTag);
|
||||||
const syndicateMeta = ExportSyndicates[syndicateTag];
|
const syndicateMeta = ExportSyndicates[syndicateTag];
|
||||||
@ -1228,6 +1229,12 @@ export const addStanding = (
|
|||||||
Tag: syndicateTag,
|
Tag: syndicateTag,
|
||||||
Standing: gainedStanding
|
Standing: gainedStanding
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (syndicateMeta.alignments && propagateAlignments) {
|
||||||
|
for (const [tag, factor] of Object.entries(syndicateMeta.alignments)) {
|
||||||
|
addStanding(inventory, tag, gainedStanding * factor, affiliationMods, isMedallion, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: AffiliationMods support (Nightwave).
|
// TODO: AffiliationMods support (Nightwave).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user