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

chore: npm update (#3122)

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

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

代码差异

8 个文件 +375 -491
Modified src/controllers/api/modularWeaponSaleController.ts +2 -2
@@ -25,7 +25,7 @@ export const modularWeaponSaleController: RequestHandler = async (req, res) => {
25 25 for (const [uniqueName, data] of Object.entries(ExportWeapons)) {
26 26 if (
27 27 data.partType &&
28 data.premiumPrice &&
28 data.platinumCost &&
29 29 !data.excludeFromCodex // exclude pvp variants
30 30 ) {
31 31 partTypeToParts[data.partType] ??= [];
@@ -147,7 +147,7 @@ const getModularWeaponSale = (
147 147 const parts = partTypes.map(partType => rng.randomElement(partTypeToParts[partType])!);
148 148 let partsCost = 0;
149 149 for (const part of parts) {
150 partsCost += ExportWeapons[part].premiumPrice!;
150 partsCost += ExportWeapons[part].platinumCost!;
151 151 }
152 152 return {
153 153 Name: name,
Modified src/controllers/api/removeFromAllianceController.ts +2 -2
@@ -29,8 +29,8 @@ export const removeFromAllianceController: RequestHandler = async (req, res) =>
29 29 await deleteAlliance(allianceMember.allianceId);
30 30 } else {
31 31 await Promise.all([
32 await Guild.updateOne({ _id: allianceMember.guildId }, { $unset: { AllianceId: "" } }),
33 await AllianceMember.deleteOne({ _id: allianceMember._id })
32 Guild.updateOne({ _id: allianceMember.guildId }, { $unset: { AllianceId: "" } }),
33 AllianceMember.deleteOne({ _id: allianceMember._id })
34 34 ]);
35 35 }
36 36
Modified src/models/inboxModel.ts +4 -5
@@ -4,11 +4,10 @@ import { toMongoDate, toOid } from "../helpers/inventoryHelpers.ts";
4 4 import { typeCountSchema } from "./inventoryModels/inventoryModel.ts";
5 5 import type { IMongoDate, IOid, ITypeCount } from "../types/commonTypes.ts";
6 6
7 export interface IMessageClient
8 extends Omit<
9 IMessageDatabase,
10 "_id" | "globaUpgradeId" | "date" | "startDate" | "endDate" | "ownerId" | "attVisualOnly" | "expiry"
11 > {
7 export interface IMessageClient extends Omit<
8 IMessageDatabase,
9 "_id" | "globaUpgradeId" | "date" | "startDate" | "endDate" | "ownerId" | "attVisualOnly" | "expiry"
10 > {
12 11 _id?: IOid;
13 12 globaUpgradeId?: IOid; // [sic]
14 13 date: IMongoDate;
Modified src/types/equipmentTypes.ts +12 -13
@@ -66,19 +66,18 @@ export interface IEquipmentDatabase {
66 66 _id: Types.ObjectId;
67 67 }
68 68
69 export interface IEquipmentClient
70 extends Omit<
71 IEquipmentDatabase,
72 | "_id"
73 | "Configs"
74 | "InfestationDate"
75 | "Expiry"
76 | "UpgradesExpiry"
77 | "UmbraDate"
78 | "Weapon"
79 | "CrewMembers"
80 | "Details"
81 > {
69 export interface IEquipmentClient extends Omit<
70 IEquipmentDatabase,
71 | "_id"
72 | "Configs"
73 | "InfestationDate"
74 | "Expiry"
75 | "UpgradesExpiry"
76 | "UmbraDate"
77 | "Weapon"
78 | "CrewMembers"
79 | "Details"
80 > {
82 81 ItemId: IOidWithLegacySupport;
83 82 Configs: IItemConfig[];
84 83 InfestationDate?: IMongoDate;
Modified src/types/guildTypes.ts +4 -5
@@ -192,11 +192,10 @@ export interface IDojoComponentClient {
192 192 Settings?: string;
193 193 }
194 194
195 export interface IDojoComponentDatabase
196 extends Omit<
197 IDojoComponentClient,
198 "id" | "SortId" | "pi" | "CompletionTime" | "DestructionTime" | "Decos" | "PaintBot"
199 > {
195 export interface IDojoComponentDatabase extends Omit<
196 IDojoComponentClient,
197 "id" | "SortId" | "pi" | "CompletionTime" | "DestructionTime" | "Decos" | "PaintBot"
198 > {
200 199 _id: Types.ObjectId;
201 200 SortId?: Types.ObjectId;
202 201 pi?: Types.ObjectId;
Modified src/types/inventoryTypes/inventoryTypes.ts +22 -14
@@ -71,7 +71,8 @@ export interface IAccountCheats {
71 71 }
72 72
73 73 export interface IInventoryDatabase
74 extends Omit<
74 extends
75 Omit<
75 76 IInventoryClient,
76 77 | "TrainingDate"
77 78 | "LoadOutPresets"
@@ -599,8 +600,10 @@ export interface IUpgradeClient {
599 600 Rank?: number;
600 601 }
601 602
602 export interface IUpgradeDatabase
603 extends Omit<IUpgradeClient, "ItemId" | "ParentId" | "Slot" | "AmountRemaining" | "Rank"> {
603 export interface IUpgradeDatabase extends Omit<
604 IUpgradeClient,
605 "ItemId" | "ParentId" | "Slot" | "AmountRemaining" | "Rank"
606 > {
604 607 _id: Types.ObjectId;
605 608 }
606 609
@@ -694,8 +697,10 @@ export interface IInfestedFoundryClient {
694 697 AbilityOverrideUnlockCooldown?: IMongoDate;
695 698 }
696 699
697 export interface IInfestedFoundryDatabase
698 extends Omit<IInfestedFoundryClient, "LastConsumedSuit" | "AbilityOverrideUnlockCooldown"> {
700 export interface IInfestedFoundryDatabase extends Omit<
701 IInfestedFoundryClient,
702 "LastConsumedSuit" | "AbilityOverrideUnlockCooldown"
703 > {
699 704 LastConsumedSuit?: IEquipmentDatabase;
700 705 AbilityOverrideUnlockCooldown?: Date;
701 706 }
@@ -868,11 +873,10 @@ export interface IPendingRecipeDatabase {
868 873 KubrowPet?: Types.ObjectId;
869 874 }
870 875
871 export interface IPendingRecipeClient
872 extends Omit<
873 IPendingRecipeDatabase,
874 "CompletionDate" | "LongGuns" | "Pistols" | "Melee" | "SuitToUnbrand" | "KubrowPet"
875 > {
876 export interface IPendingRecipeClient extends Omit<
877 IPendingRecipeDatabase,
878 "CompletionDate" | "LongGuns" | "Pistols" | "Melee" | "SuitToUnbrand" | "KubrowPet"
879 > {
876 880 CompletionDate: IMongoDate;
877 881 }
878 882
@@ -974,8 +978,10 @@ export interface IPersonalTechProjectDatabase {
974 978 CompletionDate?: Date;
975 979 }
976 980
977 export interface IPersonalTechProjectClient
978 extends Omit<IPersonalTechProjectDatabase, "CategoryItemId" | "CompletionDate"> {
981 export interface IPersonalTechProjectClient extends Omit<
982 IPersonalTechProjectDatabase,
983 "CategoryItemId" | "CompletionDate"
984 > {
979 985 CategoryItemId?: IOid;
980 986 CompletionDate?: IMongoDate;
981 987 ItemId: IOid;
@@ -1148,8 +1154,10 @@ export interface IDialogueClient {
1148 1154 DialogueName: string;
1149 1155 }
1150 1156
1151 export interface IDialogueDatabase
1152 extends Omit<IDialogueClient, "AvailableDate" | "AvailableGiftDate" | "RankUpExpiry" | "BountyChemExpiry"> {
1157 export interface IDialogueDatabase extends Omit<
1158 IDialogueClient,
1159 "AvailableDate" | "AvailableGiftDate" | "RankUpExpiry" | "BountyChemExpiry"
1160 > {
1153 1161 AvailableDate: Date;
1154 1162 AvailableGiftDate: Date;
1155 1163 RankUpExpiry: Date;
Modified src/types/saveLoadoutTypes.ts +4 -2
@@ -142,8 +142,10 @@ export interface ILoadoutConfigClient {
142 142 Remove?: boolean; // when client wants to remove a config, it only includes ItemId & Remove.
143 143 }
144 144
145 export interface ILoadoutConfigDatabase
146 extends Omit<ILoadoutConfigClient, "ItemId" | "s" | "p" | "l" | "m" | "h" | "a"> {
145 export interface ILoadoutConfigDatabase extends Omit<
146 ILoadoutConfigClient,
147 "ItemId" | "s" | "p" | "l" | "m" | "h" | "a"
148 > {
147 149 _id: Types.ObjectId;
148 150 s?: IEquipmentSelectionDatabase;
149 151 p?: IEquipmentSelectionDatabase;