Charakterbogen anpassen #7 (#9)

- Use of flexboxes in two columns for better display
- Introduction of item containers for the different storage of items

Co-authored-by: Ender <harald@drueppels.de>
Co-authored-by: Byroks <byroks@gmail.com>
Reviewed-on: Byroks/foundry-vtt-system-midgard5#9
Reviewed-by: Byroks <byroks@gmail.com>
This commit was merged in pull request #9.
This commit is contained in:
2024-01-03 15:57:15 +01:00
co-authored by Ender Byroks
parent 6baf9a0269
commit b945f22710
15 changed files with 466 additions and 166 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;