Foundryv14 migration

This commit is contained in:
2026-04-01 22:19:03 +02:00
parent 038aa37838
commit a11d9be830
91 changed files with 241 additions and 207 deletions

View File

@@ -17,4 +17,14 @@ export default class ProtectionDataModel extends foundry.abstract.TypeDataModel
dissimulation: new fields.StringField({ initial: "" })
};
}
static migrateData(data) {
for (const key of ["rarete", "quantite", "prix", "points", "malusagilite"]) {
if (typeof data[key] === "string") {
const v = parseInt(data[key]);
data[key] = Number.isNaN(v) ? 0 : v;
}
}
return data;
}
}