handle multiples of the same stripped item
All checks were successful
Build / build (20) (push) Successful in 40s
Build / build (18) (push) Successful in 1m3s
Build / build (22) (push) Successful in 1m10s
Build / build (18) (pull_request) Successful in 44s
Build / build (20) (pull_request) Successful in 1m1s
Build / build (22) (pull_request) Successful in 1m3s

This commit is contained in:
Sainan 2025-03-09 11:47:49 +01:00
parent cdd350048e
commit 09c63277a4

View File

@ -416,15 +416,17 @@ export const addMissionRewards = async (
if (!droptable) {
logger.error(`unknown droptable ${si.DropTable}`);
} else {
for (const pool of droptable) {
const reward = getRandomReward(pool.items)!;
logger.debug(`stripped droptable rolled`, reward);
await addItem(inventory, reward.type);
MissionRewards.push({
StoreItem: toStoreItem(reward.type),
ItemCount: 1,
FromEnemyCache: true // to show "identified"
});
for (let i = 0; i != si.DROP_MOD.length; ++i) {
for (const pool of droptable) {
const reward = getRandomReward(pool.items)!;
logger.debug(`stripped droptable rolled`, reward);
await addItem(inventory, reward.type);
MissionRewards.push({
StoreItem: toStoreItem(reward.type),
ItemCount: 1,
FromEnemyCache: true // to show "identified"
});
}
}
}
}