2024-12-23 09:15:41 +01:00
|
|
|
import { Types } from "mongoose";
|
2023-09-05 07:37:30 -05:00
|
|
|
import { IOid } from "@/src/types/commonTypes";
|
2024-02-18 13:58:43 +01:00
|
|
|
import { IColor } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
2024-12-19 01:42:10 +01:00
|
|
|
import { ILoadoutClient } from "./saveLoadoutTypes";
|
2023-06-05 04:16:49 +08:00
|
|
|
|
2024-02-18 13:58:43 +01:00
|
|
|
export interface IGetShipResponse {
|
|
|
|
ShipOwnerId: string;
|
|
|
|
Ship: IShip;
|
2023-12-14 17:34:15 +01:00
|
|
|
Apartment: IApartment;
|
2024-12-22 20:32:19 +01:00
|
|
|
TailorShop: ITailorShop;
|
2024-12-19 01:42:10 +01:00
|
|
|
LoadOutInventory: { LoadOutPresets: ILoadoutClient };
|
2023-06-05 04:16:49 +08:00
|
|
|
}
|
|
|
|
|
2024-02-18 13:58:43 +01:00
|
|
|
export interface IShipAttachments {
|
|
|
|
HOOD_ORNAMENT: string;
|
2023-06-05 00:17:01 +02:00
|
|
|
}
|
2023-09-05 07:37:30 -05:00
|
|
|
|
2024-02-18 13:58:43 +01:00
|
|
|
export interface IShipInterior {
|
|
|
|
Colors?: IColor;
|
|
|
|
ShipAttachments?: IShipAttachments;
|
|
|
|
SkinFlavourItem?: string;
|
|
|
|
}
|
|
|
|
|
2024-12-16 04:50:51 +01:00
|
|
|
export type TBootLocation = "LISET" | "DRIFTER_CAMP" | "APARTMENT" | "SHOP";
|
2024-05-06 15:39:27 +02:00
|
|
|
|
2024-02-18 13:58:43 +01:00
|
|
|
export interface IShip {
|
2023-06-05 04:16:49 +08:00
|
|
|
Features: string[];
|
2024-02-18 13:58:43 +01:00
|
|
|
ShipId: IOid;
|
|
|
|
ShipInterior: IShipInterior;
|
2024-12-22 20:32:19 +01:00
|
|
|
Rooms: IRoom[];
|
2025-01-20 18:25:50 +01:00
|
|
|
ContentUrlSignature?: string;
|
2024-05-06 15:39:27 +02:00
|
|
|
BootLocation?: TBootLocation;
|
2023-06-05 04:16:49 +08:00
|
|
|
}
|
|
|
|
|
2024-02-18 13:58:43 +01:00
|
|
|
export interface IShipDatabase {
|
|
|
|
ItemType: string;
|
2024-12-23 09:15:41 +01:00
|
|
|
ShipOwnerId: Types.ObjectId;
|
2024-02-18 13:58:43 +01:00
|
|
|
ShipExteriorColors?: IColor;
|
|
|
|
AirSupportPower: string;
|
|
|
|
ShipAttachments?: IShipAttachments;
|
|
|
|
SkinFlavourItem?: string;
|
|
|
|
}
|
|
|
|
|
2024-12-22 20:32:19 +01:00
|
|
|
export interface IRoom {
|
2023-06-05 04:16:49 +08:00
|
|
|
Name: string;
|
|
|
|
MaxCapacity: number;
|
2024-02-18 13:58:43 +01:00
|
|
|
PlacedDecos?: IPlacedDecosDatabase[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IPlants {
|
|
|
|
PlantType: string;
|
|
|
|
EndTime: IOid;
|
|
|
|
PlotIndex: number;
|
|
|
|
}
|
|
|
|
export interface IPlanters {
|
|
|
|
Name: string;
|
|
|
|
Plants: IPlants[];
|
2023-06-05 04:16:49 +08:00
|
|
|
}
|
|
|
|
|
2024-02-18 13:58:43 +01:00
|
|
|
export interface IGardening {
|
2025-01-20 18:25:50 +01:00
|
|
|
Planters?: IPlanters[];
|
2024-02-18 13:58:43 +01:00
|
|
|
}
|
2023-12-14 17:34:15 +01:00
|
|
|
export interface IApartment {
|
2024-02-18 13:58:43 +01:00
|
|
|
Gardening: IGardening;
|
2024-12-22 20:32:19 +01:00
|
|
|
Rooms: IRoom[];
|
2023-06-05 04:16:49 +08:00
|
|
|
FavouriteLoadouts: string[];
|
|
|
|
}
|
2024-02-18 13:58:43 +01:00
|
|
|
|
|
|
|
export interface IPlacedDecosDatabase {
|
|
|
|
Type: string;
|
|
|
|
Pos: [number, number, number];
|
|
|
|
Rot: [number, number, number];
|
2024-12-22 20:34:04 +01:00
|
|
|
Scale?: number;
|
2024-10-18 16:54:49 +02:00
|
|
|
PictureFrameInfo?: IPictureFrameInfo;
|
2024-02-18 13:58:43 +01:00
|
|
|
_id: Types.ObjectId;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IPlacedDecosClient extends Omit<IPlacedDecosDatabase, "_id"> {
|
|
|
|
id: IOid;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ISetShipCustomizationsRequest {
|
|
|
|
ShipId: string;
|
|
|
|
Customization: Customization;
|
|
|
|
IsExterior: boolean;
|
|
|
|
AirSupportPower?: string;
|
2025-02-08 17:41:33 -08:00
|
|
|
IsShop?: boolean;
|
2024-02-18 13:58:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface Customization {
|
|
|
|
SkinFlavourItem: string;
|
|
|
|
Colors: IColor;
|
|
|
|
ShipAttachments: ShipAttachments;
|
2025-02-08 17:41:33 -08:00
|
|
|
LevelDecosVisible: boolean;
|
|
|
|
CustomJson: string;
|
2024-02-18 13:58:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//TODO: check for more attachments
|
|
|
|
export interface ShipAttachments {
|
|
|
|
HOOD_ORNAMENT: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IShipDecorationsRequest {
|
|
|
|
Type: string;
|
|
|
|
Pos: [number, number, number];
|
|
|
|
Rot: [number, number, number];
|
|
|
|
Room: string;
|
2024-12-22 20:32:19 +01:00
|
|
|
BootLocation?: TBootLocation;
|
|
|
|
IsApartment?: boolean;
|
2024-06-15 17:39:13 +02:00
|
|
|
RemoveId?: string;
|
|
|
|
MoveId?: string;
|
|
|
|
OldRoom?: string;
|
|
|
|
Scale?: number;
|
2024-02-18 13:58:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IShipDecorationsResponse {
|
2024-06-15 17:39:13 +02:00
|
|
|
DecoId?: string;
|
|
|
|
Room?: string;
|
2024-12-22 20:32:19 +01:00
|
|
|
IsApartment?: boolean;
|
2024-02-18 13:58:43 +01:00
|
|
|
MaxCapacityIncrease?: number;
|
2024-06-15 17:39:13 +02:00
|
|
|
OldRoom?: string;
|
|
|
|
NewRoom?: string;
|
2024-02-18 13:58:43 +01:00
|
|
|
}
|
2024-10-18 16:54:49 +02:00
|
|
|
|
|
|
|
export interface ISetPlacedDecoInfoRequest {
|
|
|
|
DecoType: string;
|
|
|
|
DecoId: string;
|
|
|
|
Room: string;
|
|
|
|
PictureFrameInfo: IPictureFrameInfo;
|
2025-04-04 06:02:40 -07:00
|
|
|
BootLocation?: string;
|
|
|
|
ComponentId?: string;
|
|
|
|
GuildId?: string;
|
2024-10-18 16:54:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IPictureFrameInfo {
|
|
|
|
Image: string;
|
|
|
|
Filter: string;
|
|
|
|
XOffset: number;
|
|
|
|
YOffset: number;
|
|
|
|
Scale: number;
|
|
|
|
InvertX: boolean;
|
|
|
|
InvertY: boolean;
|
|
|
|
ColorCorrection: number;
|
|
|
|
Text: string;
|
|
|
|
TextScale: number;
|
|
|
|
TextColorA: number;
|
|
|
|
TextColorB: number;
|
|
|
|
TextOrientation: number;
|
|
|
|
}
|
2024-12-22 20:32:19 +01:00
|
|
|
|
|
|
|
export interface IFavouriteLoadout {
|
|
|
|
Tag: string;
|
|
|
|
LoadoutId: IOid;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IFavouriteLoadoutDatabase {
|
|
|
|
Tag: string;
|
|
|
|
LoadoutId: Types.ObjectId;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ITailorShopDatabase {
|
|
|
|
FavouriteLoadouts: IFavouriteLoadoutDatabase[];
|
2025-02-08 17:41:33 -08:00
|
|
|
Colors?: IColor;
|
|
|
|
CustomJson: string;
|
2024-12-22 20:32:19 +01:00
|
|
|
LevelDecosVisible: boolean;
|
|
|
|
Rooms: IRoom[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ITailorShop extends Omit<ITailorShopDatabase, "FavouriteLoadouts"> {
|
|
|
|
FavouriteLoadouts: IFavouriteLoadout[];
|
|
|
|
}
|