返回提交历史
Modified
src/models/inventoryModels/inventoryModel.ts
+7
-2
Modified
src/services/saveLoadoutService.ts
+5
-0
Modified
src/types/inventoryTypes/inventoryTypes.ts
+1
-1
Modified
src/types/saveLoadoutTypes.ts
+3
-1
XFEstudio/SpaceNinjaServer
feat: save lotus customization (#1864)
Closes #768 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1864 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
781f0152
代码差异
4 个文件
+16
-4
@@ -96,7 +96,8 @@ import {
96
96
IInvasionProgressDatabase,
97
97
IInvasionProgressClient,
98
98
IAccolades,
99
IHubNpcCustomization
99
IHubNpcCustomization,
100
ILotusCustomization
100
101
} from "../../types/inventoryTypes/inventoryTypes";
101
102
import { IOid } from "../../types/commonTypes";
102
103
import {
@@ -780,6 +781,10 @@ const loreFragmentScansSchema = new Schema<ILoreFragmentScan>(
780
781
{ _id: false }
781
782
);
782
783
784
const lotusCustomizationSchema = new Schema<ILotusCustomization>().add(ItemConfigSchema).add({
785
Persona: String
786
});
787
783
788
const evolutionProgressSchema = new Schema<IEvolutionProgress>(
784
789
{
785
790
Progress: Number,
@@ -1628,7 +1633,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
1628
1633
1629
1634
//Purchase this new permanent skin from the Lotus customization options in Personal Quarters located in your Orbiter.
1630
1635
//https://warframe.fandom.com/wiki/Lotus#The_New_War
1631
LotusCustomization: Schema.Types.Mixed,
1636
LotusCustomization: { type: lotusCustomizationSchema, default: undefined },
1632
1637
1633
1638
//Progress+Rank+ItemType(ZarimanPumpShotgun)
1634
1639
//https://warframe.fandom.com/wiki/Incarnon
@@ -161,6 +161,11 @@ export const handleInventoryItemConfigChange = async (
161
161
}
162
162
break;
163
163
}
164
case "LotusCustomization": {
165
logger.debug(`saved LotusCustomization`, equipmentChanges.LotusCustomization);
166
inventory.LotusCustomization = equipmentChanges.LotusCustomization;
167
break;
168
}
164
169
default: {
165
170
if (equipmentKeys.includes(equipmentName as TEquipmentKey) && equipmentName != "ValidNewLoadoutId") {
166
171
logger.debug(`general Item config saved of type ${equipmentName}`, {
@@ -328,7 +328,7 @@ export interface IInventoryClient extends IDailyAffiliations, InventoryClientEqu
328
328
BlessingCooldown?: IMongoDate;
329
329
CrewShipRawSalvage: ITypeCount[];
330
330
CrewMembers: ICrewMemberClient[];
331
LotusCustomization: ILotusCustomization;
331
LotusCustomization?: ILotusCustomization;
332
332
UseAdultOperatorLoadout?: boolean;
333
333
NemesisAbandonedRewards: string[];
334
334
LastInventorySync: IOid;
@@ -6,7 +6,8 @@ import {
6
6
ICrewShipMembersClient,
7
7
ICrewShipWeapon,
8
8
IFlavourItem,
9
ILoadoutConfigClient
9
ILoadoutConfigClient,
10
ILotusCustomization
10
11
} from "./inventoryTypes/inventoryTypes";
11
12
12
13
export interface ISaveLoadoutRequest {
@@ -43,6 +44,7 @@ export interface ISaveLoadoutRequest {
43
44
EquippedEmotes: string[];
44
45
UseAdultOperatorLoadout: boolean;
45
46
WeaponSkins: IItemEntry;
47
LotusCustomization: ILotusCustomization;
46
48
}
47
49
48
50
export type ISaveLoadoutRequestNoUpgradeVer = Omit<ISaveLoadoutRequest, "UpgradeVer">;