Added migration path for 3.8.3 profiles into new 3.9.0 structure

This commit is contained in:
Dev 2024-05-21 19:47:01 +01:00
parent 2cb8e149b8
commit 6656c733a3

View File

@ -156,6 +156,13 @@ export class GameController
this.logger.debug(`Started game with sessionId: ${sessionID} ${pmcProfile.Info?.Nickname}`); this.logger.debug(`Started game with sessionId: ${sessionID} ${pmcProfile.Info?.Nickname}`);
// Migrate aki object data into spt for 3.9.0 release
if ((fullProfile as any).aki)
{
fullProfile.spt = this.cloner.clone((fullProfile as any).aki);
delete (fullProfile as any).aki;
}
if (this.coreConfig.fixes.fixProfileBreakingInventoryItemIssues) if (this.coreConfig.fixes.fixProfileBreakingInventoryItemIssues)
{ {
this.profileFixerService.fixProfileBreakingInventoryItemIssues(pmcProfile); this.profileFixerService.fixProfileBreakingInventoryItemIssues(pmcProfile);