DataModels + Appv2 migration : OK
This commit is contained in:
@@ -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(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user