Expanded 398 profile migration system

This commit is contained in:
Dev 2024-11-06 17:02:19 +00:00
parent e43cee5386
commit 2d26e2b0a7

View File

@ -246,9 +246,22 @@ export class GameController {
for (const dialogKey in fullProfile.dialogues) {
const isValidKey = this.hashUtil.isValidMongoId(dialogKey);
if (!isValidKey) {
this.logger.warning(`Migration: deleting: ${dialogKey} dialog`);
delete fullProfile.dialogues[dialogKey];
}
}
// Remove PMC 'ragfair' from trader list
if (fullProfile.characters.pmc.TradersInfo.ragfair) {
this.logger.warning("Migration: deleting: ragfair traderinfo object from PMC");
delete fullProfile.characters.pmc.TradersInfo.ragfair;
}
// Remove SCAV 'ragfair' from trader list
if (fullProfile.characters.scav.TradersInfo.ragfair) {
this.logger.warning("Migration: deleting: ragfair traderinfo object from PMC");
delete fullProfile.characters.scav.TradersInfo.ragfair;
}
}
/**