Make Items with mods equippable (#11)

Changes:
 + Items that can influence you stats are equippable
 + only equipped items influence your stats
 + Armor now influences your stats
 + move mods into a partial for easier changes
This commit is contained in:
2023-11-30 15:50:59 +01:00
committed by GitHub
parent 8095785fc2
commit 28595e7dd0
13 changed files with 143 additions and 125 deletions
+4 -1
View File
@@ -138,7 +138,7 @@ export class M5Character extends Actor {
const aggregate = new M5ModAggregate(data, ret);
context.items
?.filter((item) => item.type === "item" || item.type === "effect")
?.filter((item) => (item.type === "item" || item.type === "effect" || item.type === "armor") && item.system.equipped)
.forEach((item) => {
const mods = item.system.mods;
//console.log("Actor item mods", mods)
@@ -166,6 +166,7 @@ export class M5Character extends Actor {
label: label,
magic: item.system.magic,
calc: item.system.calc,
equipped: item.system?.equipped,
};
});
}
@@ -185,6 +186,7 @@ export class M5Character extends Actor {
label: label,
magic: item.system.magic,
calc: item.system.calc,
equipped: item.system?.equipped,
};
});
}
@@ -267,6 +269,7 @@ export class M5Character extends Actor {
label: label,
magic: item.system.magic,
calc: item.system.calc,
equipped: item.system?.equipped,
};
});
}