XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

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

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1016 Co-authored-by: Sainan <sainan@calamity.inc> Co-committed-by: Sainan <sainan@calamity.inc>

93afc264
Sainan <sainan@calamity.inc>
提交于

代码差异

2 个文件 +8 -8
Modified src/services/missionInventoryUpdateService.ts +6 -8
@@ -233,9 +233,7 @@ export const addMissionRewards = async (
233 233 }
234 234
235 235 //TODO: check double reward merging
236 const MissionRewards = getRandomMissionDrops(rewardInfo).map(drop => {
237 return { StoreItem: drop.type, ItemCount: drop.itemCount };
238 });
236 const MissionRewards: IMissionReward[] = getRandomMissionDrops(rewardInfo);
239 237 logger.debug("random mission drops:", MissionRewards);
240 238 const inventoryChanges: IInventoryChanges = {};
241 239
@@ -382,8 +380,8 @@ function getLevelCreditRewards(nodeName: string): number {
382 380 //TODO: get dark sektor fixed credit rewards and railjack bonus
383 381 }
384 382
385 function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] {
386 const drops: IRngResult[] = [];
383 function getRandomMissionDrops(RewardInfo: IRewardInfo): IMissionReward[] {
384 const drops: IMissionReward[] = [];
387 385 if (RewardInfo.node in ExportRegions) {
388 386 const region = ExportRegions[RewardInfo.node];
389 387 const rewardManifests: string[] =
@@ -408,7 +406,7 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] {
408 406 const rotationRewards = table[rotation];
409 407 const drop = getRandomRewardByChance(rotationRewards);
410 408 if (drop) {
411 drops.push(drop);
409 drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount });
412 410 }
413 411 }
414 412 });
@@ -418,7 +416,7 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] {
418 416 for (let rotation = 0; rotation != RewardInfo.EnemyCachesFound; ++rotation) {
419 417 const drop = getRandomRewardByChance(deck[rotation]);
420 418 if (drop) {
421 drops.push(drop);
419 drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount, FromEnemyCache: true });
422 420 }
423 421 }
424 422 }
@@ -437,7 +435,7 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] {
437 435
438 436 const drop = getRandomRewardByChance(deck[rotation]);
439 437 if (drop) {
440 drops.push(drop);
438 drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount });
441 439 }
442 440 }
443 441 }
Modified src/types/missionTypes.ts +2 -0
@@ -8,4 +8,6 @@ export interface IMissionReward {
8 8 ItemCount: number;
9 9 TweetText?: string;
10 10 ProductCategory?: string;
11 FromEnemyCache?: boolean;
12 IsStrippedItem?: boolean;
11 13 }