diff --git a/module/item/item-sheet.js b/module/item/item-sheet.js index f223455..818a45d 100644 --- a/module/item/item-sheet.js +++ b/module/item/item-sheet.js @@ -29,13 +29,22 @@ export class BoLItemSheet extends ItemSheet { data.itemProperties = this.item.itemProperties; data.isGM = game.user.isGM; - // Dynamic spell fix - if (itemData.type == "item" && itemData.data.category == 'spell') { - for (let i=0; i<4; i++) { - itemData.data.properties.mandatoryconditions[i] = itemData.data.properties.mandatoryconditions[i]?? "" + // Dynamic default data fix/adapt + if (itemData.type == "item") { + if (!itemData.data.category) { + itemData.data.category = "equipment" } - for (let i=0; i<8; i++) { - itemData.data.properties.optionnalconditions[i] = itemData.data.properties.optionnalconditions[i]?? "" + if (itemData.data.category == 'spell') { + for (let i = 0; i < 4; i++) { + itemData.data.properties.mandatoryconditions[i] = itemData.data.properties.mandatoryconditions[i] ?? "" + } + for (let i = 0; i < 8; i++) { + itemData.data.properties.optionnalconditions[i] = itemData.data.properties.optionnalconditions[i] ?? "" + } + } + } else { + if (!itemData.data.subtype) { + itemData.data.category = "origin" } } @@ -58,6 +67,7 @@ export class BoLItemSheet extends ItemSheet { /** @override */ activateListeners(html) { + super.activateListeners(html); // Everything below here is only needed if the sheet is editable if (!this.options.editable) return; diff --git a/system.json b/system.json index 660661e..adc894c 100644 --- a/system.json +++ b/system.json @@ -7,7 +7,7 @@ "url": "https://github.com/ZigmundKreud/bol", "license": "LICENSE.txt", "flags": {}, - "version": "0.9.1.0", + "version": "0.9.1.1", "templateVersion": 18, "minimumCoreVersion": "0.8.6", "compatibleCoreVersion": "9", @@ -116,7 +116,7 @@ "manifest": "https://raw.githubusercontent.com/ZigmundKreud/bol/master/system.json", "download": "https://github.com/ZigmundKreud/bol/archive/refs/heads/master.zip", "protected": false, - "background": "ui/splash-page.webp", + "background": "images/map_lemurie.webp", "gridDistance": 1.5, "gridUnits": "m", "primaryTokenAttribute": "resources.hp",