Fixed migration

This commit is contained in:
2020-12-01 06:43:25 +01:00
parent d94636bbe6
commit 14a77c37b9
3 changed files with 7 additions and 9 deletions

View File

@@ -8,11 +8,9 @@ export const migrateWorld = async function () {
{permanent: true}
);
console.log(game.system.data.version)
// Migrate to v0.0.3 from v0.0.2 and v0.0.1
game.items.forEach((item) => {
// Migrate to v0.1 from v0.0.1 and v0.0.1
if (item.data.type === "spell") {
if(item.data.type === "spell") {
item.update({"data.roll.label": "SPELL.ROLLTITLE"});
}
});
@@ -20,4 +18,4 @@ export const migrateWorld = async function () {
// Set the migration as complete
game.settings.set("kopparhavet", "worldSchemaVersion", game.system.data.version);
ui.notifications.info(`System Migration to version ${game.system.data.version} completed!`, { permanent: true });
}
};