DataModels + Appv2 migration : OK

This commit is contained in:
2026-02-28 21:00:06 +01:00
parent 8017bb207d
commit 1ffb8b08fc
119 changed files with 2268 additions and 384 deletions

View File

@@ -237,6 +237,11 @@ export class BoLUtility {
if (chatData.img.includes("/blank.png")) {
chatData.img = null;
}
// For old-format weapon items lacking stat fields, apply defaults so the chat card can display them
if (chatData.system?.properties?.weapon && !chatData.system.properties.damage) {
const defaults = game.bol.config.defaultNaturalWeapon?.properties ?? {};
chatData.system.properties = Object.assign(foundry.utils.duplicate(defaults), chatData.system.properties);
}
// JSON object for easy creation
chatData.jsondata = JSON.stringify(
{