fix: items from enemy caches not showing "identified"
All checks were successful
Build / build (20) (push) Successful in 41s
Build / build (18) (pull_request) Successful in 40s
Build / build (20) (pull_request) Successful in 1m3s
Build / build (18) (push) Successful in 1m5s
Build / build (22) (push) Successful in 1m11s
Build / build (22) (pull_request) Successful in 1m8s

This commit is contained in:
Sainan 2025-02-25 09:34:45 +01:00
parent 2efe0df2f2
commit 1b6ae7a1d4
2 changed files with 8 additions and 8 deletions

View File

@ -252,9 +252,7 @@ export const addMissionRewards = async (
}
//TODO: check double reward merging
const MissionRewards = getRandomMissionDrops(rewardInfo).map(drop => {
return { StoreItem: drop.type, ItemCount: drop.itemCount };
});
const MissionRewards: IMissionReward[] = getRandomMissionDrops(rewardInfo);
logger.debug("random mission drops:", MissionRewards);
const inventoryChanges: IInventoryChanges = {};
@ -389,8 +387,8 @@ function getLevelCreditRewards(nodeName: string): number {
//TODO: get dark sektor fixed credit rewards and railjack bonus
}
function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] {
const drops: IRngResult[] = [];
function getRandomMissionDrops(RewardInfo: IRewardInfo): IMissionReward[] {
const drops: IMissionReward[] = [];
if (RewardInfo.node in ExportRegions) {
const region = ExportRegions[RewardInfo.node];
const rewardManifests = region.rewardManifests;
@ -412,7 +410,7 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] {
const rotationRewards = table[rotation];
const drop = getRandomRewardByChance(rotationRewards);
if (drop) {
drops.push(drop);
drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount });
}
}
});
@ -422,7 +420,7 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] {
for (let rotation = 0; rotation != RewardInfo.EnemyCachesFound; ++rotation) {
const drop = getRandomRewardByChance(deck[rotation]);
if (drop) {
drops.push(drop);
drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount, FromEnemyCache: true });
}
}
}
@ -441,7 +439,7 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] {
const drop = getRandomRewardByChance(deck[rotation]);
if (drop) {
drops.push(drop);
drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount });
}
}
}

View File

@ -8,4 +8,6 @@ export interface IMissionReward {
ItemCount: number;
TweetText?: string;
ProductCategory?: string;
FromEnemyCache?: boolean;
IsStrippedItem?: boolean;
}