Revision of the gear tab:

- Use of flexboxes in two columns for better display
- Introduction of item containers for the different storage of items
This commit is contained in:
Ender
2023-12-31 11:00:17 +01:00
parent 6baf9a0269
commit a9d7bbb5b2
15 changed files with 465 additions and 165 deletions
+16 -1
View File
@@ -14,7 +14,22 @@ export class M5Item extends Item {
const itemData = (this as any).system;
const calc = itemData.calc;
if (itemType === "skill") {
if (itemType === "item") {
calc.containers = null;
if (actor) {
const actorCalc = actor.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true, effects: true, kampfkuenste: true });
if (actorCalc) {
calc.containers = actorCalc.gear.containers;
}
const container = character.getItem(itemData.containerId);
//console.log("M5Item.prepareDerivedData:containers", itemData, container?.system)
if (container) {
container.prepareDerivedData();
const containerData = container.system;
}
}
} else if (itemType === "skill") {
calc.fw = itemData.fw;
calc.bonus = 0;