- 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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user