mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Removed DestroyOnEmpty from consumables
This commit is contained in:
parent
263c05c307
commit
848a7ab466
65 changed files with 7 additions and 82 deletions
|
|
@ -754,20 +754,10 @@ export default class DhpActor extends Actor {
|
|||
resources.forEach(r => {
|
||||
if (r.itemId) {
|
||||
const { path, value } = game.system.api.fields.ActionFields.CostField.getItemIdCostUpdate(r);
|
||||
|
||||
if (
|
||||
r.key === 'quantity' &&
|
||||
r.target.type === 'consumable' &&
|
||||
value === 0 &&
|
||||
r.target.system.destroyOnEmpty
|
||||
) {
|
||||
r.target.delete();
|
||||
} else {
|
||||
updates.items[r.key] = {
|
||||
target: r.target,
|
||||
resources: { [path]: value }
|
||||
};
|
||||
}
|
||||
updates.items[r.key] = {
|
||||
target: r.target,
|
||||
resources: { [path]: value }
|
||||
};
|
||||
} else {
|
||||
const valueFunc = (base, resource, baseMax) => {
|
||||
if (resource.clear) return baseMax && base.inverted ? baseMax : 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue