2024-02-18 13:58:43 +01:00
|
|
|
import { Schema, 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";
|
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;
|
|
|
|
LoadOutInventory: { LoadOutPresets: Types.ObjectId };
|
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-05-06 15:39:27 +02:00
|
|
|
export type TBootLocation = "LISET" | "DRIFTER_CAMP" | "APARTMENT";
|
|
|
|
|
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;
|
|
|
|
Rooms: IRooms[];
|
2023-06-05 04:16:49 +08: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;
|
|
|
|
ShipOwnerId: Schema.Types.ObjectId;
|
|
|
|
ShipInteriorColors?: IColor;
|
|
|
|
ShipExteriorColors?: IColor;
|
|
|
|
AirSupportPower: string;
|
|
|
|
ShipAttachments?: IShipAttachments;
|
|
|
|
SkinFlavourItem?: string;
|
|
|
|
}
|
|
|
|
|
2023-12-14 17:34:15 +01:00
|
|
|
export interface IRooms {
|
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 {
|
|
|
|
Planters: IPlanters[];
|
|
|
|
}
|
2023-12-14 17:34:15 +01:00
|
|
|
export interface IApartment {
|
2024-02-18 13:58:43 +01:00
|
|
|
Gardening: IGardening;
|
2023-12-14 17:34:15 +01:00
|
|
|
Rooms: IRooms[];
|
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-06-15 17:39:13 +02: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;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Customization {
|
|
|
|
SkinFlavourItem: string;
|
|
|
|
Colors: IColor;
|
|
|
|
ShipAttachments: ShipAttachments;
|
|
|
|
}
|
|
|
|
|
|
|
|
//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;
|
|
|
|
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-02-18 13:58:43 +01:00
|
|
|
IsApartment: boolean;
|
|
|
|
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;
|
|
|
|
BootLocation: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|