#18 Remove ContainerId from containers

Changes
 + remove containerId variable from containers as it's not needed
This commit is contained in:
Byroks 2024-01-08 12:09:49 +01:00
parent cfdba0ee75
commit fbbd55c420
1 changed files with 20 additions and 23 deletions

View File

@ -150,7 +150,6 @@ export class M5Character extends Actor {
ret.stats.wealth = data.info.gold + data.info.silver / 10 + data.info.copper / 100;
ret.stats.hoard = 0;
if (!skip?.mods) {
const aggregate = new M5ModAggregate(data, ret);
@ -177,10 +176,10 @@ export class M5Character extends Actor {
let label = item.name;
if (item.system.magic) {
label += "*";
};
}
if (item.system.valuable) {
ret.stats.wealth += item.system.value || 0;
};
}
if (item.system.hoarded) {
ret.stats.hoard += item.system.value || 0;
}
@ -243,13 +242,11 @@ export class M5Character extends Actor {
calc: item.system.calc,
equipped: item.system?.equipped,
weight: item.system.weight || 0,
containerId: item.system.containerId || "",
value: item.system.value || 0,
currency: item.system.currency || "",
quantity: item.system.quantity || 0,
rollExist: rollable,
};
});
}
@ -262,7 +259,7 @@ export class M5Character extends Actor {
let label = item.name;
if (item.system.magic) {
label += "*";
};
}
ret.gear.effects[item.id] = {
label: label,
@ -306,10 +303,10 @@ export class M5Character extends Actor {
(item.system.stats.damageBonus < 0 ? "" : "+") +
item.system.stats.damageBonus +
")";
};
}
if (item.system.valuable) {
ret.stats.wealth += item.system.value || 0;
};
}
if (item.system.hoarded) {
ret.stats.hoard += item.system.value || 0;
}
@ -335,10 +332,10 @@ export class M5Character extends Actor {
let label = item.name;
if (item.system.magic) {
label += "*(" + (item.system.stats.defenseBonus < 0 ? "" : "+") + item.system.stats.defenseBonus + ")";
};
}
if (item.system.valuable) {
ret.stats.wealth += item.system.value || 0;
};
}
if (item.system.hoarded) {
ret.stats.hoard += item.system.value || 0;
}
@ -364,10 +361,10 @@ export class M5Character extends Actor {
let label = item.name;
if (item.system.magic) {
label += "*";
};
}
if (item.system.valuable) {
ret.stats.wealth += item.system.value || 0;
};
}
if (item.system.hoarded) {
ret.stats.hoard += item.system.value || 0;
}