chore: reformat with 2 spaces
This commit is contained in:
parent
d659e4bed9
commit
7670d7f808
1577 changed files with 70010 additions and 70042 deletions
|
@ -3,32 +3,32 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import {
|
||||
getSceneMigrator,
|
||||
migrateCollection,
|
||||
migrateCompendiums,
|
||||
getCompendiumMigrator,
|
||||
getActorMigrator,
|
||||
getSceneMigrator,
|
||||
migrateCollection,
|
||||
migrateCompendiums,
|
||||
getCompendiumMigrator,
|
||||
getActorMigrator,
|
||||
} from "./migrationHelpers.js";
|
||||
|
||||
/** @type {import("./migration.js").Migration["migrate"]} */
|
||||
async function migrate() {
|
||||
const itemsResult = await migrateCollection(game.items, migrateItem);
|
||||
const actorsResult = await migrateCollection(game.actors, migrateActor);
|
||||
const scenesResult = await migrateCollection(game.scenes, migrateScene);
|
||||
const compendiumsResult = await migrateCompendiums(migrateCompendium);
|
||||
return itemsResult === "error" ||
|
||||
actorsResult === "error" ||
|
||||
scenesResult === "error" ||
|
||||
compendiumsResult === "error"
|
||||
? "error"
|
||||
: "success";
|
||||
const itemsResult = await migrateCollection(game.items, migrateItem);
|
||||
const actorsResult = await migrateCollection(game.actors, migrateActor);
|
||||
const scenesResult = await migrateCollection(game.scenes, migrateScene);
|
||||
const compendiumsResult = await migrateCompendiums(migrateCompendium);
|
||||
return itemsResult === "error" ||
|
||||
actorsResult === "error" ||
|
||||
scenesResult === "error" ||
|
||||
compendiumsResult === "error"
|
||||
? "error"
|
||||
: "success";
|
||||
}
|
||||
|
||||
/** @type {import('./migrationHelpers.js').Migrator<Item>} */
|
||||
async function migrateItem(item) {
|
||||
if (item.type === "spell") {
|
||||
await item.update({ system: { allowsDefense: false } });
|
||||
}
|
||||
if (item.type === "spell") {
|
||||
await item.update({ system: { allowsDefense: false } });
|
||||
}
|
||||
}
|
||||
|
||||
const migrateActor = getActorMigrator(migrateItem);
|
||||
|
@ -37,6 +37,6 @@ const migrateCompendium = getCompendiumMigrator({ migrateItem, migrateActor, mig
|
|||
|
||||
/** @type {import("./migration.js").Migration} */
|
||||
export const migration = {
|
||||
migrate,
|
||||
migrateCompendium,
|
||||
migrate,
|
||||
migrateCompendium,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue