feat: save lotus customization (#1864)

Closes #768

Reviewed-on: OpenWF/SpaceNinjaServer#1864
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
Sainan 2025-04-26 11:56:22 -07:00 committed by Sainan
parent ac37702468
commit 781f01520f
4 changed files with 16 additions and 4 deletions

View File

@ -96,7 +96,8 @@ import {
IInvasionProgressDatabase,
IInvasionProgressClient,
IAccolades,
IHubNpcCustomization
IHubNpcCustomization,
ILotusCustomization
} from "../../types/inventoryTypes/inventoryTypes";
import { IOid } from "../../types/commonTypes";
import {
@ -780,6 +781,10 @@ const loreFragmentScansSchema = new Schema<ILoreFragmentScan>(
{ _id: false }
);
const lotusCustomizationSchema = new Schema<ILotusCustomization>().add(ItemConfigSchema).add({
Persona: String
});
const evolutionProgressSchema = new Schema<IEvolutionProgress>(
{
Progress: Number,
@ -1628,7 +1633,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
//Purchase this new permanent skin from the Lotus customization options in Personal Quarters located in your Orbiter.
//https://warframe.fandom.com/wiki/Lotus#The_New_War
LotusCustomization: Schema.Types.Mixed,
LotusCustomization: { type: lotusCustomizationSchema, default: undefined },
//Progress+Rank+ItemType(ZarimanPumpShotgun)
//https://warframe.fandom.com/wiki/Incarnon

View File

@ -161,6 +161,11 @@ export const handleInventoryItemConfigChange = async (
}
break;
}
case "LotusCustomization": {
logger.debug(`saved LotusCustomization`, equipmentChanges.LotusCustomization);
inventory.LotusCustomization = equipmentChanges.LotusCustomization;
break;
}
default: {
if (equipmentKeys.includes(equipmentName as TEquipmentKey) && equipmentName != "ValidNewLoadoutId") {
logger.debug(`general Item config saved of type ${equipmentName}`, {

View File

@ -328,7 +328,7 @@ export interface IInventoryClient extends IDailyAffiliations, InventoryClientEqu
BlessingCooldown?: IMongoDate;
CrewShipRawSalvage: ITypeCount[];
CrewMembers: ICrewMemberClient[];
LotusCustomization: ILotusCustomization;
LotusCustomization?: ILotusCustomization;
UseAdultOperatorLoadout?: boolean;
NemesisAbandonedRewards: string[];
LastInventorySync: IOid;

View File

@ -6,7 +6,8 @@ import {
ICrewShipMembersClient,
ICrewShipWeapon,
IFlavourItem,
ILoadoutConfigClient
ILoadoutConfigClient,
ILotusCustomization
} from "./inventoryTypes/inventoryTypes";
export interface ISaveLoadoutRequest {
@ -43,6 +44,7 @@ export interface ISaveLoadoutRequest {
EquippedEmotes: string[];
UseAdultOperatorLoadout: boolean;
WeaponSkins: IItemEntry;
LotusCustomization: ILotusCustomization;
}
export type ISaveLoadoutRequestNoUpgradeVer = Omit<ISaveLoadoutRequest, "UpgradeVer">;