forked from OpenWF/SpaceNinjaServer
93 lines
2.4 KiB
TypeScript
93 lines
2.4 KiB
TypeScript
|
import { IOid } from "@/src/types/commonTypes";
|
||
|
import { IItemConfig, IOperatorConfigClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||
|
import { Types } from "mongoose";
|
||
|
|
||
|
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;
|
||
|
MechSuits: IItemEntry;
|
||
|
CrewShipHarnesses: IItemEntry;
|
||
|
Horses: IItemEntry;
|
||
|
DrifterMelee: IItemEntry;
|
||
|
UpgradeVer: number;
|
||
|
OperatorLoadOuts: IOperatorConfigEntry;
|
||
|
AdultOperatorLoadOuts: IOperatorConfigEntry;
|
||
|
KahlLoadOuts: IItemEntry;
|
||
|
CrewShips: IItemEntry;
|
||
|
CurrentLoadOutIds: IOid[];
|
||
|
ValidNewLoadoutId: string;
|
||
|
EquippedGear: string[];
|
||
|
}
|
||
|
|
||
|
export interface ISaveLoadoutRequestNoUpgradeVer extends Omit<ISaveLoadoutRequest, "UpgradeVer"> {}
|
||
|
|
||
|
export interface IOperatorConfigEntry {
|
||
|
[configId: string]: IOperatorConfigClient;
|
||
|
}
|
||
|
|
||
|
export interface IItemEntry {
|
||
|
[itemId: string]: IConfigEntry;
|
||
|
}
|
||
|
|
||
|
export interface IConfigEntry {
|
||
|
[configId: string]: IItemConfig;
|
||
|
}
|
||
|
|
||
|
export interface ILoadoutClient extends Omit<ILoadoutDatabase, "_id" | "loadoutOwnerId"> {}
|
||
|
|
||
|
export interface ILoadoutDatabase {
|
||
|
NORMAL: ILoadoutEntry;
|
||
|
SENTINEL: ILoadoutEntry;
|
||
|
ARCHWING: ILoadoutEntry;
|
||
|
NORMAL_PVP: ILoadoutEntry;
|
||
|
LUNARO: ILoadoutEntry;
|
||
|
OPERATOR: ILoadoutEntry;
|
||
|
KDRIVE: ILoadoutEntry;
|
||
|
DATAKNIFE: ILoadoutEntry;
|
||
|
MECH: ILoadoutEntry;
|
||
|
OPERATOR_ADULT: ILoadoutEntry;
|
||
|
DRIFTER: ILoadoutEntry;
|
||
|
_id: Types.ObjectId;
|
||
|
loadoutOwnerId: Types.ObjectId;
|
||
|
}
|
||
|
|
||
|
export interface ILoadoutEntry {
|
||
|
[key: string]: ILoadoutConfigClient;
|
||
|
}
|
||
|
export interface ILoadoutConfigDatabase extends Omit<ILoadoutConfigClient, "ItemId"> {
|
||
|
_id: Types.ObjectId;
|
||
|
}
|
||
|
|
||
|
// for request and response from and to client
|
||
|
export interface ILoadoutConfigClient {
|
||
|
ItemId: IOid;
|
||
|
n: string;
|
||
|
PresetIcon: string;
|
||
|
Favorite: boolean;
|
||
|
s: IEquipmentSelection;
|
||
|
p: IEquipmentSelection;
|
||
|
l: IEquipmentSelection;
|
||
|
m: IEquipmentSelection;
|
||
|
}
|
||
|
|
||
|
export interface IEquipmentSelection {
|
||
|
ItemId: IOid;
|
||
|
mod: number;
|
||
|
cus: number;
|
||
|
}
|