Removed DestroyOnEmpty from consumables

This commit is contained in:
WBHarry 2026-03-23 00:33:02 +01:00
parent 263c05c307
commit 848a7ab466
65 changed files with 7 additions and 82 deletions

View file

@ -2461,8 +2461,7 @@
"featuresLabel": "Community Feature"
},
"Consumable": {
"consumeOnUse": "Consume On Use",
"destroyOnEmpty": "Destroy On Empty"
"consumeOnUse": "Consume On Use"
},
"DomainCard": {
"type": "Type",

View file

@ -18,8 +18,7 @@ export default class DHConsumable extends BaseDataItem {
const fields = foundry.data.fields;
return {
...super.defineSchema(),
consumeOnUse: new fields.BooleanField({ initial: true }),
destroyOnEmpty: new fields.BooleanField({ initial: true })
consumeOnUse: new fields.BooleanField({ initial: true })
};
}

View file

@ -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;

View file

@ -40,7 +40,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -48,7 +48,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 60,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 62,

View file

@ -40,7 +40,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 60,

View file

@ -40,7 +40,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 62,

View file

@ -40,7 +40,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -40,7 +40,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 60,

View file

@ -40,7 +40,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 60,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 62,

View file

@ -89,7 +89,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -71,7 +71,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 60,

View file

@ -134,7 +134,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 62,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 60,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 62,

View file

@ -84,7 +84,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -40,7 +40,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -91,7 +91,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 60,

View file

@ -71,7 +71,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -40,7 +40,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -40,7 +40,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 62,

View file

@ -89,7 +89,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -84,7 +84,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -84,7 +84,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -84,7 +84,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 60,

View file

@ -84,7 +84,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 60,

View file

@ -40,7 +40,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 62,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 60,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -40,7 +40,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 62,

View file

@ -85,7 +85,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 62,

View file

@ -85,7 +85,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -84,7 +84,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -71,7 +71,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 62,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 60,

View file

@ -64,7 +64,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -159,7 +159,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 62,

View file

@ -91,7 +91,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 60,

View file

@ -85,7 +85,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 60,

View file

@ -40,7 +40,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 60,

View file

@ -45,7 +45,6 @@
}
},
"consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": {
"source": "Daggerheart SRD",
"page": 61,

View file

@ -2,7 +2,7 @@
"id": "daggerheart",
"title": "Daggerheart",
"description": "An unofficial implementation of the Daggerheart system",
"version": "1.9.4",
"version": "1.9.5",
"compatibility": {
"minimum": "13.346",
"verified": "13.351",

View file

@ -10,8 +10,5 @@
<span>{{localize "DAGGERHEART.ITEMS.Consumable.consumeOnUse"}}</span>
{{formField systemFields.consumeOnUse value=source.system.consumeOnUse}}
<span>{{localize "DAGGERHEART.ITEMS.Consumable.destroyOnEmpty"}}</span>
{{formField systemFields.destroyOnEmpty value=source.system.destroyOnEmpty}}
</fieldset>
</section>