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

XFESpaceNinjaServer

A simple server for a small space ninja game

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

XFEstudio/XFESpaceNinjaServer

chore: fix slotNames duplication (#1798)

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

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

代码差异

2 个文件 +3 -14
Modified src/services/importService.ts +2 -14
@@ -37,6 +37,7 @@ import {
37 37 } from "../types/inventoryTypes/inventoryTypes";
38 38 import { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel";
39 39 import { ILoadoutConfigDatabase, ILoadoutDatabase } from "../types/saveLoadoutTypes";
40 import { slotNames } from "../types/purchaseTypes";
40 41
41 42 const convertDate = (value: IMongoDate): Date => {
42 43 return new Date(parseInt(value.$date.$numberLong));
@@ -212,20 +213,7 @@ export const importInventory = (db: TInventoryDatabaseDocument, client: Partial<
212 213 replaceArray<IOperatorConfigDatabase>(db[key], client[key].map(convertOperatorConfig));
213 214 }
214 215 }
215 for (const key of [
216 "SuitBin",
217 "WeaponBin",
218 "SentinelBin",
219 "SpaceSuitBin",
220 "SpaceWeaponBin",
221 "PvpBonusLoadoutBin",
222 "PveBonusLoadoutBin",
223 "RandomModBin",
224 "MechBin",
225 "CrewMemberBin",
226 "OperatorAmpBin",
227 "CrewShipSalvageBin"
228 ] as const) {
216 for (const key of slotNames) {
229 217 if (client[key] !== undefined) {
230 218 replaceSlots(db[key], client[key]);
231 219 }
Modified src/types/purchaseTypes.ts +1 -0
@@ -103,6 +103,7 @@ export const slotNames = [
103 103 "WeaponBin",
104 104 "MechBin",
105 105 "PveBonusLoadoutBin",
106 "PvpBonusLoadoutBin",
106 107 "SentinelBin",
107 108 "SpaceSuitBin",
108 109 "SpaceWeaponBin",