2023-12-14 17:34:15 +01:00
|
|
|
import { IOid } from "@/src/types/commonTypes";
|
|
|
|
import { IItemConfig, IOperatorConfigClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
|
|
|
import { Types } from "mongoose";
|
2024-06-16 17:51:20 +02:00
|
|
|
import { ILoadoutConfigClient } from "./inventoryTypes/inventoryTypes";
|
2023-12-14 17:34:15 +01:00
|
|
|
|
|
|
|
export interface ISaveLoadoutRequest {
|
|
|
|
LoadOuts: ILoadoutClient;
|
|
|
|
LongGuns: IItemEntry;
|
|
|
|
OperatorAmps: IItemEntry;
|
|
|
|
Pistols: IItemEntry;
|
|
|
|
Suits: IItemEntry;
|
|
|
|
Melee: IItemEntry;
|
|
|
|
Sentinels: IItemEntry;
|
|
|
|
SentinelWeapons: IItemEntry;
|
|
|
|
KubrowPets: IItemEntry;
|
|
|
|
SpaceSuits: IItemEntry;
|
|
|
|
SpaceGuns: IItemEntry;
|
|
|
|
SpaceMelee: IItemEntry;
|
|
|
|
Scoops: IItemEntry;
|
|
|
|
SpecialItems: IItemEntry;
|
|
|
|
MoaPets: IItemEntry;
|
|
|
|
Hoverboards: IItemEntry;
|
|
|
|
DataKnives: IItemEntry;
|
2024-12-16 12:25:28 +08:00
|
|
|
Motorcycles: IItemEntry;
|
2023-12-14 17:34:15 +01:00
|
|
|
MechSuits: IItemEntry;
|
|
|
|
CrewShipHarnesses: IItemEntry;
|
|
|
|
Horses: IItemEntry;
|
|
|
|
DrifterMelee: IItemEntry;
|
|
|
|
UpgradeVer: number;
|
|
|
|
AdultOperatorLoadOuts: IOperatorConfigEntry;
|
2025-01-27 13:18:16 +01:00
|
|
|
OperatorLoadOuts: IOperatorConfigEntry;
|
|
|
|
KahlLoadOuts: IOperatorConfigEntry;
|
2023-12-14 17:34:15 +01:00
|
|
|
CrewShips: IItemEntry;
|
|
|
|
CurrentLoadOutIds: IOid[];
|
|
|
|
ValidNewLoadoutId: string;
|
|
|
|
EquippedGear: string[];
|
2024-07-03 12:33:09 +02:00
|
|
|
EquippedEmotes: string[];
|
2024-06-20 11:46:08 +02:00
|
|
|
UseAdultOperatorLoadout: boolean;
|
2025-03-29 09:27:38 -07:00
|
|
|
WeaponSkins: IItemEntry;
|
2023-12-14 17:34:15 +01:00
|
|
|
}
|
|
|
|
|
2025-03-29 15:20:54 -07:00
|
|
|
export type ISaveLoadoutRequestNoUpgradeVer = Omit<ISaveLoadoutRequest, "UpgradeVer">;
|
2023-12-14 17:34:15 +01:00
|
|
|
|
|
|
|
export interface IOperatorConfigEntry {
|
|
|
|
[configId: string]: IOperatorConfigClient;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IItemEntry {
|
|
|
|
[itemId: string]: IConfigEntry;
|
|
|
|
}
|
|
|
|
|
2025-03-27 12:27:38 -07:00
|
|
|
export type IConfigEntry = {
|
|
|
|
[configId in "0" | "1" | "2" | "3" | "4" | "5"]: IItemConfig;
|
2025-04-11 06:56:45 -07:00
|
|
|
} & { Favorite?: boolean; IsNew?: boolean };
|
2023-12-14 17:34:15 +01:00
|
|
|
|
2025-03-29 15:20:54 -07:00
|
|
|
export type ILoadoutClient = Omit<ILoadoutDatabase, "_id" | "loadoutOwnerId">;
|
2023-12-14 17:34:15 +01:00
|
|
|
|
2025-01-20 12:19:32 +01:00
|
|
|
// keep in sync with ILoadOutPresets
|
2023-12-14 17:34:15 +01:00
|
|
|
export interface ILoadoutDatabase {
|
2025-01-20 12:19:32 +01:00
|
|
|
NORMAL: ILoadoutConfigDatabase[];
|
|
|
|
SENTINEL: ILoadoutConfigDatabase[];
|
|
|
|
ARCHWING: ILoadoutConfigDatabase[];
|
|
|
|
NORMAL_PVP: ILoadoutConfigDatabase[];
|
|
|
|
LUNARO: ILoadoutConfigDatabase[];
|
|
|
|
OPERATOR: ILoadoutConfigDatabase[];
|
|
|
|
KDRIVE: ILoadoutConfigDatabase[];
|
|
|
|
DATAKNIFE: ILoadoutConfigDatabase[];
|
|
|
|
MECH: ILoadoutConfigDatabase[];
|
|
|
|
OPERATOR_ADULT: ILoadoutConfigDatabase[];
|
|
|
|
DRIFTER: ILoadoutConfigDatabase[];
|
2023-12-14 17:34:15 +01:00
|
|
|
_id: Types.ObjectId;
|
|
|
|
loadoutOwnerId: Types.ObjectId;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ILoadoutEntry {
|
|
|
|
[key: string]: ILoadoutConfigClient;
|
|
|
|
}
|
|
|
|
export interface ILoadoutConfigDatabase extends Omit<ILoadoutConfigClient, "ItemId"> {
|
|
|
|
_id: Types.ObjectId;
|
|
|
|
}
|