fix: items from enemy caches not showing "identified" (#1016)

Reviewed-on: OpenWF/SpaceNinjaServer#1016
Co-authored-by: Sainan <sainan@calamity.inc>
Co-committed-by: Sainan <sainan@calamity.inc>
This commit is contained in:
Sainan 2025-02-25 04:42:49 -08:00 committed by OrdisPrime
parent b5b088249c
commit 93afc2645c
2 changed files with 8 additions and 8 deletions

View File

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

View File

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