Fixed migration, Spell Skill
This commit is contained in:
23
module/helpers/migration-helper.js
Normal file
23
module/helpers/migration-helper.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Perform a system migration for the entire World, applying migrations for Actors, Items, and Compendium packs
|
||||
* @return {Promise} A Promise which resolves once the migration is completed
|
||||
*/
|
||||
export const migrateWorld = async function () {
|
||||
ui.notifications.info(
|
||||
`Applying System Migration for version ${game.system.data.version}. Please be patient and do not close your game or shut down your server.`,
|
||||
{permanent: true}
|
||||
);
|
||||
|
||||
console.log(game.system.data.version)
|
||||
|
||||
game.items.forEach((item) => {
|
||||
// Migrate to v0.1 from v0.0.1 and v0.0.1
|
||||
if (item.data.type === "spell") {
|
||||
item.update({"data.roll.label": "SPELL.ROLLTITLE"});
|
||||
}
|
||||
});
|
||||
|
||||
// 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 });
|
||||
}
|
||||
Reference in New Issue
Block a user