refactor: Combine Equipment and Config Types #289

Merged
AMelonInsideLemon merged 8 commits from inventoryTypes into main 2024-06-16 08:51:20 -07:00
Showing only changes of commit a614bc0cb4 - Show all commits

View File

@ -182,8 +182,7 @@ ItemConfigSchema.set("toJSON", {
}
});
const EquipmentSchema = new Schema<IEquipmentDatabase>(
{
const EquipmentSchema = new Schema<IEquipmentDatabase>({
ItemType: String,
Configs: [ItemConfigSchema],
UpgradeVer: Number,
@ -205,8 +204,7 @@ const EquipmentSchema = new Schema<IEquipmentDatabase>(
Expiry: Date,
SkillTree: String,
ArchonCrystalUpgrades: [Schema.Types.Mixed] //TODO
}
);
});
EquipmentSchema.virtual("ItemId").get(function () {
return { $oid: this._id.toString() } satisfies IOid;