feat: update for v10

This commit is contained in:
Johannes Loher 2022-11-21 03:00:46 +01:00
parent 6277e27056
commit f25b46a226
63 changed files with 41349 additions and 24332 deletions

View file

@ -23,15 +23,15 @@ async function migrate() {
/** @type {import("./migrationHelpers").ItemUpdateDataGetter} */
function getItemUpdateData(itemData) {
if (itemData.type !== "spell") return;
const spellCategory = itemData.data?.spellCategory;
const spellCategory = itemData.system?.spellCategory;
const spellGroups = migrateSpellCategory(spellCategory);
// @ts-expect-error bonus is removed with this migration
const bonus = itemData.data?.bonus;
const bonus = itemData.system?.bonus;
const spellModifier = migrateBonus(bonus);
const updateData = {
data: {
system: {
spellGroups,
"-=spellCategory": null,
spellModifier,