Fix equipment drop-down
This commit is contained in:
parent
aeb7739879
commit
48ae0920b5
@ -29,8 +29,12 @@ 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') {
|
||||
// Dynamic default data fix/adapt
|
||||
if (itemData.type == "item") {
|
||||
if (!itemData.data.category) {
|
||||
itemData.data.category = "equipment"
|
||||
}
|
||||
if (itemData.data.category == 'spell') {
|
||||
for (let i = 0; i < 4; i++) {
|
||||
itemData.data.properties.mandatoryconditions[i] = itemData.data.properties.mandatoryconditions[i] ?? ""
|
||||
}
|
||||
@ -38,6 +42,11 @@ export class BoLItemSheet extends ItemSheet {
|
||||
itemData.data.properties.optionnalconditions[i] = itemData.data.properties.optionnalconditions[i] ?? ""
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!itemData.data.subtype) {
|
||||
itemData.data.category = "origin"
|
||||
}
|
||||
}
|
||||
|
||||
console.log("ITEMDATA", data);
|
||||
return data;
|
||||
@ -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;
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user