need to also retroactively fix the import of this
This commit is contained in:
parent
4157da0327
commit
832e79c5d5
@ -781,9 +781,25 @@ const loreFragmentScansSchema = new Schema<ILoreFragmentScan>(
|
|||||||
{ _id: false }
|
{ _id: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
const lotusCustomizationSchema = new Schema<ILotusCustomization>().add(ItemConfigSchema).add({
|
// const lotusCustomizationSchema = new Schema<ILotusCustomization>().add(ItemConfigSchema).add({
|
||||||
Persona: String
|
// Persona: String
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
// Laxer schema for cleanupInventory
|
||||||
|
const lotusCustomizationSchema = new Schema<ILotusCustomization>(
|
||||||
|
{
|
||||||
|
Skins: [String],
|
||||||
|
pricol: colorSchema,
|
||||||
|
attcol: Schema.Types.Mixed,
|
||||||
|
sigcol: Schema.Types.Mixed,
|
||||||
|
eyecol: Schema.Types.Mixed,
|
||||||
|
facial: Schema.Types.Mixed,
|
||||||
|
cloth: Schema.Types.Mixed,
|
||||||
|
syancol: Schema.Types.Mixed,
|
||||||
|
Persona: String
|
||||||
|
},
|
||||||
|
{ _id: false }
|
||||||
|
);
|
||||||
|
|
||||||
const evolutionProgressSchema = new Schema<IEvolutionProgress>(
|
const evolutionProgressSchema = new Schema<IEvolutionProgress>(
|
||||||
{
|
{
|
||||||
|
@ -1847,6 +1847,25 @@ export const cleanupInventory = (inventory: TInventoryDatabaseDocument): void =>
|
|||||||
logger.debug(`removing FreeFavorsEarned from LibrarySyndicate`);
|
logger.debug(`removing FreeFavorsEarned from LibrarySyndicate`);
|
||||||
LibrarySyndicate.FreeFavorsEarned = undefined;
|
LibrarySyndicate.FreeFavorsEarned = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (inventory.LotusCustomization) {
|
||||||
|
if (
|
||||||
|
Array.isArray(inventory.LotusCustomization.attcol) ||
|
||||||
|
Array.isArray(inventory.LotusCustomization.sigcol) ||
|
||||||
|
Array.isArray(inventory.LotusCustomization.eyecol) ||
|
||||||
|
Array.isArray(inventory.LotusCustomization.facial) ||
|
||||||
|
Array.isArray(inventory.LotusCustomization.cloth) ||
|
||||||
|
Array.isArray(inventory.LotusCustomization.syancol)
|
||||||
|
) {
|
||||||
|
logger.debug(`fixing empty objects represented as empty arrays in LotusCustomization`);
|
||||||
|
inventory.LotusCustomization.attcol = {};
|
||||||
|
inventory.LotusCustomization.sigcol = {};
|
||||||
|
inventory.LotusCustomization.eyecol = {};
|
||||||
|
inventory.LotusCustomization.facial = {};
|
||||||
|
inventory.LotusCustomization.cloth = {};
|
||||||
|
inventory.LotusCustomization.syancol = {};
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getCalendarProgress = (inventory: TInventoryDatabaseDocument): ICalendarProgress => {
|
export const getCalendarProgress = (inventory: TInventoryDatabaseDocument): ICalendarProgress => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user