SpaceNinjaServer/src/models/commonModel.ts
Sainan 5089f67146 chore: improve ship customization stuff (#2402)
The only functionally relevant change is that orbiter scenes are now saved via SkinFlavourItem (as of U39?).
The rest is cleanup of the types because the ship customization stuff was duplicated all over the place.

Reviewed-on: OpenWF/SpaceNinjaServer#2402
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
2025-07-04 15:19:15 -07:00

27 lines
640 B
TypeScript

import { Schema } from "mongoose";
import { IColor } from "@/src/types/inventoryTypes/commonInventoryTypes";
import { IShipCustomization } from "@/src/types/personalRoomsTypes";
export const colorSchema = new Schema<IColor>(
{
t0: Number,
t1: Number,
t2: Number,
t3: Number,
en: Number,
e1: Number,
m0: Number,
m1: Number
},
{ _id: false }
);
export const shipCustomizationSchema = new Schema<IShipCustomization>(
{
SkinFlavourItem: String,
Colors: colorSchema,
ShipAttachments: { HOOD_ORNAMENT: String }
},
{ _id: false }
);