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

feat: handle creditsFee in missionInventoryUpdate (#1431)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1431 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

cfa9ec77
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

2 个文件 +9 -0
Modified src/services/missionInventoryUpdateService.ts +7 -0
@@ -28,6 +28,7 @@ import {
28 28 addRecipes,
29 29 addShipDecorations,
30 30 combineInventoryChanges,
31 updateCurrency,
31 32 updateSyndicate
32 33 } from "@/src/services/inventoryService";
33 34 import { updateQuestKey } from "@/src/services/questService";
@@ -430,6 +431,12 @@ export const addMissionInventoryUpdates = async (
430 431 }
431 432 break;
432 433 }
434 case "creditsFee": {
435 updateCurrency(inventory, value, false);
436 inventoryChanges.RegularCredits ??= 0;
437 inventoryChanges.RegularCredits -= value;
438 break;
439 }
433 440 default:
434 441 // Equipment XP updates
435 442 if (equipmentKeys.includes(key as TEquipmentKey)) {
Modified src/types/requestTypes.ts +2 -0
@@ -116,6 +116,8 @@ export type IMissionInventoryUpdateRequest = {
116 116 CurrentLoadOutIds?: {
117 117 LoadOuts?: ILoadOutPresets; // sent when recovered weapons from zanuka capture
118 118 };
119 wagerTier?: number; // the index
120 creditsFee?: number; // the index
119 121 } & {
120 122 [K in TEquipmentKey]?: IEquipmentClient[];
121 123 };