diff --git a/project/src/controllers/GameController.ts b/project/src/controllers/GameController.ts index 742aa2a3..653a08ee 100644 --- a/project/src/controllers/GameController.ts +++ b/project/src/controllers/GameController.ts @@ -159,9 +159,16 @@ export class GameController { return; } + if (typeof fullProfile.spt.migrations === "undefined") { + fullProfile.spt.migrations = {}; + } + //3.9 migrations - if (fullProfile.spt.version.includes("3.9")) { + if (fullProfile.spt.version.includes("3.9.") && !fullProfile.spt.migrations["39x"]) { this.migrate39xProfile(fullProfile); + + // Flag as migrated + fullProfile.spt.migrations["39x"] = this.timeUtil.getTimestamp(); } if (Array.isArray(fullProfile.characters.pmc.WishList)) { diff --git a/project/src/models/eft/profile/ISptProfile.ts b/project/src/models/eft/profile/ISptProfile.ts index fbc5ae56..5dfe6079 100644 --- a/project/src/models/eft/profile/ISptProfile.ts +++ b/project/src/models/eft/profile/ISptProfile.ts @@ -195,6 +195,8 @@ export interface Spt { blacklistedItemTpls?: string[]; /** key: daily type */ freeRepeatableRefreshUsedCount?: Record; + /** When was a profile migrated, value is timestamp */ + migrations?: Record; } export interface ModDetails {