Finishes mod system functionality
This commit is contained in:
@@ -128,7 +128,7 @@ export class M5Character extends Actor {
|
||||
|
||||
context.items?.filter(item => item.data.type === "item").forEach(item => {
|
||||
const mods = item.data.data.mods
|
||||
console.log("Actor item mods", mods)
|
||||
//console.log("Actor item mods", mods)
|
||||
Object.keys(mods).forEach(modIndex => {
|
||||
const mod = mods[modIndex] as M5ItemMod
|
||||
aggregate.push(mod, item.data.name)
|
||||
|
||||
@@ -60,10 +60,13 @@ export default class M5ModAggregate {
|
||||
}
|
||||
|
||||
let key = mod.id
|
||||
if (mod.type === M5ModType.ATTRIBUTE)
|
||||
key = (mod.id + "").toLowerCase()
|
||||
else if (mod.type === M5ModType.STAT)
|
||||
key = (mod.id + "").toLowerCase()
|
||||
// if (mod.type === M5ModType.ATTRIBUTE) {
|
||||
// key = M5Attributes[mod.id] as string
|
||||
// console.log("M5ModType.ATTRIBUTE", mod.id, key)
|
||||
// } else if (mod.type === M5ModType.STAT) {
|
||||
// key = M5Stats[mod.id] as string
|
||||
// console.log("M5ModType.STAT", mod.id, key)
|
||||
// }
|
||||
|
||||
if (map.has(key))
|
||||
map.get(key).push(pair)
|
||||
|
||||
Reference in New Issue
Block a user