diff --git a/lang/en.json b/lang/en.json index 4032b6ed..98cae76b 100755 --- a/lang/en.json +++ b/lang/en.json @@ -2461,7 +2461,8 @@ "featuresLabel": "Community Feature" }, "Consumable": { - "consumeOnUse": "Consume On Use" + "consumeOnUse": "Consume On Use", + "destroyOnEmpty": "Destroy On Empty" }, "DomainCard": { "type": "Type", diff --git a/module/data/item/consumable.mjs b/module/data/item/consumable.mjs index ab527967..5a50525a 100644 --- a/module/data/item/consumable.mjs +++ b/module/data/item/consumable.mjs @@ -18,7 +18,8 @@ export default class DHConsumable extends BaseDataItem { const fields = foundry.data.fields; return { ...super.defineSchema(), - consumeOnUse: new fields.BooleanField({ initial: true }) + consumeOnUse: new fields.BooleanField({ initial: true }), + destroyOnEmpty: new fields.BooleanField({ initial: true }) }; } diff --git a/module/documents/actor.mjs b/module/documents/actor.mjs index 13843bb8..787797ff 100644 --- a/module/documents/actor.mjs +++ b/module/documents/actor.mjs @@ -754,10 +754,20 @@ export default class DhpActor extends Actor { resources.forEach(r => { if (r.itemId) { const { path, value } = game.system.api.fields.ActionFields.CostField.getItemIdCostUpdate(r); - updates.items[r.key] = { - target: r.target, - resources: { [path]: value } - }; + + 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 } + }; + } } else { const valueFunc = (base, resource, baseMax) => { if (resource.clear) return baseMax && base.inverted ? baseMax : 0; diff --git a/module/documents/tooltipManager.mjs b/module/documents/tooltipManager.mjs index bf107a42..6cfecb00 100644 --- a/module/documents/tooltipManager.mjs +++ b/module/documents/tooltipManager.mjs @@ -169,19 +169,70 @@ export default class DhTooltipManager extends foundry.helpers.interaction.Toolti } } - this.noOffset = options.noOffset; - super.activate(element, { ...options, html: html }); + this.baseActivate(element, { ...options, html: html }); } - _setAnchor(direction) { + /* Need to pass more options to _setAnchor, so have to copy whole foundry method >_< */ + async baseActivate(element, options) { + let { text, direction, cssClass, locked = false, html, content } = options; + if (content && !html) { + foundry.utils.logCompatibilityWarning( + 'The content option has been deprecated in favor of the html option', + { since: 13, until: 15, once: true } + ); + html = content; + } + if (text && html) throw new Error('Cannot provide both text and html options to TooltipManager#activate.'); + // Deactivate currently active element + this.deactivate(); + // Check if the element still exists in the DOM. + if (!document.body.contains(element)) return; + // Mark the new element as active + this.#active = true; + this.element = element; + element.setAttribute('aria-describedby', 'tooltip'); + html ||= element.dataset.tooltipHtml; + if (html) { + if (typeof html === 'string') this.tooltip.innerHTML = foundry.utils.cleanHTML(html); + else { + this.tooltip.innerHTML = ''; // Clear existing HTML + this.tooltip.appendChild(html); + } + } else { + text ||= element.dataset.tooltipText; + if (text) this.tooltip.textContent = text; + else { + text = element.dataset.tooltip; + // Localized message should be safe + if (game.i18n.has(text)) this.tooltip.innerHTML = game.i18n.localize(text); + else this.tooltip.innerHTML = foundry.utils.cleanHTML(text); + } + } + + // Activate display of the tooltip + this.tooltip.removeAttribute('class'); + this.tooltip.classList.add('active', 'themed', 'theme-dark'); + this.tooltip.showPopover(); + cssClass ??= element.closest('[data-tooltip-class]')?.dataset.tooltipClass; + if (cssClass) this.tooltip.classList.add(...cssClass.split(' ')); + + // Set tooltip position + direction ??= element.closest('[data-tooltip-direction]')?.dataset.tooltipDirection; + if (!direction) direction = this._determineDirection(); + this._setAnchor(direction, options); + + if (locked || element.dataset.hasOwnProperty('locked')) this.lockTooltip(); + } + + _setAnchor(direction, options = {}) { const directions = this.constructor.TOOLTIP_DIRECTIONS; const pad = this.constructor.TOOLTIP_MARGIN_PX; const pos = this.element.getBoundingClientRect(); const { innerHeight, innerWidth } = this.tooltip.ownerDocument.defaultView; const tooltipPadding = 16; - const horizontalOffset = this.noOffset ? tooltipPadding : this.tooltip.offsetWidth / 2 - pos.width / 2; - const verticalOffset = this.noOffset ? tooltipPadding : this.tooltip.offsetHeight / 2 - pos.height / 2; + const horizontalOffset = options.noOffset ? tooltipPadding : this.tooltip.offsetWidth / 2 - pos.width / 2; + const verticalOffset = options.noOffset ? tooltipPadding : this.tooltip.offsetHeight / 2 - pos.height / 2; const style = {}; switch (direction) { diff --git a/src/packs/items/consumables/consumable_Acidpaste_cfVFmS8vT9dbq9s1.json b/src/packs/items/consumables/consumable_Acidpaste_cfVFmS8vT9dbq9s1.json index c1833e87..7c2d113d 100644 --- a/src/packs/items/consumables/consumable_Acidpaste_cfVFmS8vT9dbq9s1.json +++ b/src/packs/items/consumables/consumable_Acidpaste_cfVFmS8vT9dbq9s1.json @@ -40,6 +40,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Armor_Stitcher_VlbsCjvvLNfTzNXb.json b/src/packs/items/consumables/consumable_Armor_Stitcher_VlbsCjvvLNfTzNXb.json index d78986cf..58efc3cc 100644 --- a/src/packs/items/consumables/consumable_Armor_Stitcher_VlbsCjvvLNfTzNXb.json +++ b/src/packs/items/consumables/consumable_Armor_Stitcher_VlbsCjvvLNfTzNXb.json @@ -48,6 +48,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Attune_Potion_JGD3M9hBHtVAA8XP.json b/src/packs/items/consumables/consumable_Attune_Potion_JGD3M9hBHtVAA8XP.json index e034976a..f19c55c3 100644 --- a/src/packs/items/consumables/consumable_Attune_Potion_JGD3M9hBHtVAA8XP.json +++ b/src/packs/items/consumables/consumable_Attune_Potion_JGD3M9hBHtVAA8XP.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 60, diff --git a/src/packs/items/consumables/consumable_Blinding_Orb_eAXHdzA5qNPldOpn.json b/src/packs/items/consumables/consumable_Blinding_Orb_eAXHdzA5qNPldOpn.json index 3e237b65..94a6671b 100644 --- a/src/packs/items/consumables/consumable_Blinding_Orb_eAXHdzA5qNPldOpn.json +++ b/src/packs/items/consumables/consumable_Blinding_Orb_eAXHdzA5qNPldOpn.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 62, diff --git a/src/packs/items/consumables/consumable_Blood_of_the_Yorgi_pDGzmczoTlKGmKgd.json b/src/packs/items/consumables/consumable_Blood_of_the_Yorgi_pDGzmczoTlKGmKgd.json index df40e563..6a84b89b 100644 --- a/src/packs/items/consumables/consumable_Blood_of_the_Yorgi_pDGzmczoTlKGmKgd.json +++ b/src/packs/items/consumables/consumable_Blood_of_the_Yorgi_pDGzmczoTlKGmKgd.json @@ -40,6 +40,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Bolster_Potion_FOPQNqXbiVO0ilYL.json b/src/packs/items/consumables/consumable_Bolster_Potion_FOPQNqXbiVO0ilYL.json index 421acdc3..c6241a9c 100644 --- a/src/packs/items/consumables/consumable_Bolster_Potion_FOPQNqXbiVO0ilYL.json +++ b/src/packs/items/consumables/consumable_Bolster_Potion_FOPQNqXbiVO0ilYL.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 60, diff --git a/src/packs/items/consumables/consumable_Bonding_Honey_PfQvqopXgvroBklL.json b/src/packs/items/consumables/consumable_Bonding_Honey_PfQvqopXgvroBklL.json index 04532b27..4240ae2e 100644 --- a/src/packs/items/consumables/consumable_Bonding_Honey_PfQvqopXgvroBklL.json +++ b/src/packs/items/consumables/consumable_Bonding_Honey_PfQvqopXgvroBklL.json @@ -40,6 +40,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 62, diff --git a/src/packs/items/consumables/consumable_Bridge_Seed_RrIasiMCt6mqVTps.json b/src/packs/items/consumables/consumable_Bridge_Seed_RrIasiMCt6mqVTps.json index b81e7f36..a80481d5 100644 --- a/src/packs/items/consumables/consumable_Bridge_Seed_RrIasiMCt6mqVTps.json +++ b/src/packs/items/consumables/consumable_Bridge_Seed_RrIasiMCt6mqVTps.json @@ -40,6 +40,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Channelstone_IKMVQ6VwtapwoUim.json b/src/packs/items/consumables/consumable_Channelstone_IKMVQ6VwtapwoUim.json index 28a13044..f4ec4476 100644 --- a/src/packs/items/consumables/consumable_Channelstone_IKMVQ6VwtapwoUim.json +++ b/src/packs/items/consumables/consumable_Channelstone_IKMVQ6VwtapwoUim.json @@ -40,6 +40,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Charm_Potion_CVBbFfOY75YwyQsp.json b/src/packs/items/consumables/consumable_Charm_Potion_CVBbFfOY75YwyQsp.json index f1d7b058..48303854 100644 --- a/src/packs/items/consumables/consumable_Charm_Potion_CVBbFfOY75YwyQsp.json +++ b/src/packs/items/consumables/consumable_Charm_Potion_CVBbFfOY75YwyQsp.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 60, diff --git a/src/packs/items/consumables/consumable_Circle_of_the_Void_elsyP6VhHw1JjGSl.json b/src/packs/items/consumables/consumable_Circle_of_the_Void_elsyP6VhHw1JjGSl.json index 7c93342e..159a1381 100644 --- a/src/packs/items/consumables/consumable_Circle_of_the_Void_elsyP6VhHw1JjGSl.json +++ b/src/packs/items/consumables/consumable_Circle_of_the_Void_elsyP6VhHw1JjGSl.json @@ -40,6 +40,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Control_Potion_eeBhZSGLjuNZuJuI.json b/src/packs/items/consumables/consumable_Control_Potion_eeBhZSGLjuNZuJuI.json index 2c6b9a93..9523cdce 100644 --- a/src/packs/items/consumables/consumable_Control_Potion_eeBhZSGLjuNZuJuI.json +++ b/src/packs/items/consumables/consumable_Control_Potion_eeBhZSGLjuNZuJuI.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 60, diff --git a/src/packs/items/consumables/consumable_Death_Tea_xDnJeF1grkmKck8Q.json b/src/packs/items/consumables/consumable_Death_Tea_xDnJeF1grkmKck8Q.json index 5fbae976..1a7ae1a5 100644 --- a/src/packs/items/consumables/consumable_Death_Tea_xDnJeF1grkmKck8Q.json +++ b/src/packs/items/consumables/consumable_Death_Tea_xDnJeF1grkmKck8Q.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 62, diff --git a/src/packs/items/consumables/consumable_Dragonbloom_Tea_wM18PWWW2Ami4fBG.json b/src/packs/items/consumables/consumable_Dragonbloom_Tea_wM18PWWW2Ami4fBG.json index 0dc8764d..f484f3c9 100644 --- a/src/packs/items/consumables/consumable_Dragonbloom_Tea_wM18PWWW2Ami4fBG.json +++ b/src/packs/items/consumables/consumable_Dragonbloom_Tea_wM18PWWW2Ami4fBG.json @@ -89,6 +89,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Dripfang_Poison_eU8VpbWB2NHIL47n.json b/src/packs/items/consumables/consumable_Dripfang_Poison_eU8VpbWB2NHIL47n.json index 3b0eb9e7..70070ab2 100644 --- a/src/packs/items/consumables/consumable_Dripfang_Poison_eU8VpbWB2NHIL47n.json +++ b/src/packs/items/consumables/consumable_Dripfang_Poison_eU8VpbWB2NHIL47n.json @@ -71,6 +71,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Enlighten_Potion_aWHSO2AqDufi7nL4.json b/src/packs/items/consumables/consumable_Enlighten_Potion_aWHSO2AqDufi7nL4.json index bff70126..02ffa6d9 100644 --- a/src/packs/items/consumables/consumable_Enlighten_Potion_aWHSO2AqDufi7nL4.json +++ b/src/packs/items/consumables/consumable_Enlighten_Potion_aWHSO2AqDufi7nL4.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 60, diff --git a/src/packs/items/consumables/consumable_Feast_of_Xuria_aX6NyxkNzu0LcJpt.json b/src/packs/items/consumables/consumable_Feast_of_Xuria_aX6NyxkNzu0LcJpt.json index 67f4b227..f98d86f1 100644 --- a/src/packs/items/consumables/consumable_Feast_of_Xuria_aX6NyxkNzu0LcJpt.json +++ b/src/packs/items/consumables/consumable_Feast_of_Xuria_aX6NyxkNzu0LcJpt.json @@ -134,6 +134,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 62, diff --git a/src/packs/items/consumables/consumable_Featherbone_DpxEMpwfasEBpORU.json b/src/packs/items/consumables/consumable_Featherbone_DpxEMpwfasEBpORU.json index 9b5bd0df..dbf5b19a 100644 --- a/src/packs/items/consumables/consumable_Featherbone_DpxEMpwfasEBpORU.json +++ b/src/packs/items/consumables/consumable_Featherbone_DpxEMpwfasEBpORU.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Gill_Salve_Nvbb9mze6o5D0AEg.json b/src/packs/items/consumables/consumable_Gill_Salve_Nvbb9mze6o5D0AEg.json index 890c61e4..e69c440c 100644 --- a/src/packs/items/consumables/consumable_Gill_Salve_Nvbb9mze6o5D0AEg.json +++ b/src/packs/items/consumables/consumable_Gill_Salve_Nvbb9mze6o5D0AEg.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Grindletooth_Venom_8WkhvSzeOmLdnoLJ.json b/src/packs/items/consumables/consumable_Grindletooth_Venom_8WkhvSzeOmLdnoLJ.json index 70291404..75d19c32 100644 --- a/src/packs/items/consumables/consumable_Grindletooth_Venom_8WkhvSzeOmLdnoLJ.json +++ b/src/packs/items/consumables/consumable_Grindletooth_Venom_8WkhvSzeOmLdnoLJ.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 60, diff --git a/src/packs/items/consumables/consumable_Growing_Potion_fl2f3ees8RFMze9t.json b/src/packs/items/consumables/consumable_Growing_Potion_fl2f3ees8RFMze9t.json index 933d70fa..e4493348 100644 --- a/src/packs/items/consumables/consumable_Growing_Potion_fl2f3ees8RFMze9t.json +++ b/src/packs/items/consumables/consumable_Growing_Potion_fl2f3ees8RFMze9t.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 62, diff --git a/src/packs/items/consumables/consumable_Health_Potion_Aruc2NLutWuVIjP1.json b/src/packs/items/consumables/consumable_Health_Potion_Aruc2NLutWuVIjP1.json index eb9c4824..8c620942 100644 --- a/src/packs/items/consumables/consumable_Health_Potion_Aruc2NLutWuVIjP1.json +++ b/src/packs/items/consumables/consumable_Health_Potion_Aruc2NLutWuVIjP1.json @@ -84,6 +84,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Homet_s_Secret_Potion_VSwa1LpQ9PjZKsWF.json b/src/packs/items/consumables/consumable_Homet_s_Secret_Potion_VSwa1LpQ9PjZKsWF.json index 00eb03f1..8ee6f171 100644 --- a/src/packs/items/consumables/consumable_Homet_s_Secret_Potion_VSwa1LpQ9PjZKsWF.json +++ b/src/packs/items/consumables/consumable_Homet_s_Secret_Potion_VSwa1LpQ9PjZKsWF.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Hopehold_Flare_EhaQCPJ8oiqpRIwB.json b/src/packs/items/consumables/consumable_Hopehold_Flare_EhaQCPJ8oiqpRIwB.json index 2d83ed52..809ad08e 100644 --- a/src/packs/items/consumables/consumable_Hopehold_Flare_EhaQCPJ8oiqpRIwB.json +++ b/src/packs/items/consumables/consumable_Hopehold_Flare_EhaQCPJ8oiqpRIwB.json @@ -40,6 +40,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Improved_Arcane_Shard_nQTo6mNoPTEVBtkm.json b/src/packs/items/consumables/consumable_Improved_Arcane_Shard_nQTo6mNoPTEVBtkm.json index f1e88b96..2081f33b 100644 --- a/src/packs/items/consumables/consumable_Improved_Arcane_Shard_nQTo6mNoPTEVBtkm.json +++ b/src/packs/items/consumables/consumable_Improved_Arcane_Shard_nQTo6mNoPTEVBtkm.json @@ -91,6 +91,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Improved_Grindletooth_Venom_BqBWXXe9T07AMV4u.json b/src/packs/items/consumables/consumable_Improved_Grindletooth_Venom_BqBWXXe9T07AMV4u.json index 560644b3..904c4675 100644 --- a/src/packs/items/consumables/consumable_Improved_Grindletooth_Venom_BqBWXXe9T07AMV4u.json +++ b/src/packs/items/consumables/consumable_Improved_Grindletooth_Venom_BqBWXXe9T07AMV4u.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 60, diff --git a/src/packs/items/consumables/consumable_Jar_of_Lost_Voices_yUol6M5b8jsbk9za.json b/src/packs/items/consumables/consumable_Jar_of_Lost_Voices_yUol6M5b8jsbk9za.json index 38555821..c655f7ca 100644 --- a/src/packs/items/consumables/consumable_Jar_of_Lost_Voices_yUol6M5b8jsbk9za.json +++ b/src/packs/items/consumables/consumable_Jar_of_Lost_Voices_yUol6M5b8jsbk9za.json @@ -71,6 +71,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Jumping_Root_c2putn9apuurJhWX.json b/src/packs/items/consumables/consumable_Jumping_Root_c2putn9apuurJhWX.json index c1b5eee1..dec72da8 100644 --- a/src/packs/items/consumables/consumable_Jumping_Root_c2putn9apuurJhWX.json +++ b/src/packs/items/consumables/consumable_Jumping_Root_c2putn9apuurJhWX.json @@ -40,6 +40,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Knowledge_Stone_nL9IALzm9BNi5oSt.json b/src/packs/items/consumables/consumable_Knowledge_Stone_nL9IALzm9BNi5oSt.json index 9685a44f..19f273ed 100644 --- a/src/packs/items/consumables/consumable_Knowledge_Stone_nL9IALzm9BNi5oSt.json +++ b/src/packs/items/consumables/consumable_Knowledge_Stone_nL9IALzm9BNi5oSt.json @@ -40,6 +40,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 62, diff --git a/src/packs/items/consumables/consumable_Major_Arcane_Shard_AA7bmiwv00lshPrC.json b/src/packs/items/consumables/consumable_Major_Arcane_Shard_AA7bmiwv00lshPrC.json index 76e67cf9..b9293362 100644 --- a/src/packs/items/consumables/consumable_Major_Arcane_Shard_AA7bmiwv00lshPrC.json +++ b/src/packs/items/consumables/consumable_Major_Arcane_Shard_AA7bmiwv00lshPrC.json @@ -89,6 +89,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Major_Attune_Potion_CCPFm5iXXwvyYYwR.json b/src/packs/items/consumables/consumable_Major_Attune_Potion_CCPFm5iXXwvyYYwR.json index b27fee91..6090c631 100644 --- a/src/packs/items/consumables/consumable_Major_Attune_Potion_CCPFm5iXXwvyYYwR.json +++ b/src/packs/items/consumables/consumable_Major_Attune_Potion_CCPFm5iXXwvyYYwR.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Major_Bolster_Potion_mnyQDRtngWWQeRXF.json b/src/packs/items/consumables/consumable_Major_Bolster_Potion_mnyQDRtngWWQeRXF.json index 95cd6c92..98329c78 100644 --- a/src/packs/items/consumables/consumable_Major_Bolster_Potion_mnyQDRtngWWQeRXF.json +++ b/src/packs/items/consumables/consumable_Major_Bolster_Potion_mnyQDRtngWWQeRXF.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Major_Charm_Potion_IJLAUlQymbSjzsri.json b/src/packs/items/consumables/consumable_Major_Charm_Potion_IJLAUlQymbSjzsri.json index c7e22aeb..aebb9435 100644 --- a/src/packs/items/consumables/consumable_Major_Charm_Potion_IJLAUlQymbSjzsri.json +++ b/src/packs/items/consumables/consumable_Major_Charm_Potion_IJLAUlQymbSjzsri.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Major_Control_Potion_80s1FLmTLtohZ5GH.json b/src/packs/items/consumables/consumable_Major_Control_Potion_80s1FLmTLtohZ5GH.json index 1dabf6c6..76d4ea3c 100644 --- a/src/packs/items/consumables/consumable_Major_Control_Potion_80s1FLmTLtohZ5GH.json +++ b/src/packs/items/consumables/consumable_Major_Control_Potion_80s1FLmTLtohZ5GH.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Major_Enlighten_Potion_SDdv1G2veMLKrxcJ.json b/src/packs/items/consumables/consumable_Major_Enlighten_Potion_SDdv1G2veMLKrxcJ.json index 5a9a2d28..9bbd4290 100644 --- a/src/packs/items/consumables/consumable_Major_Enlighten_Potion_SDdv1G2veMLKrxcJ.json +++ b/src/packs/items/consumables/consumable_Major_Enlighten_Potion_SDdv1G2veMLKrxcJ.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Major_Health_Potion_cM7pHe8bBAxSZ2xR.json b/src/packs/items/consumables/consumable_Major_Health_Potion_cM7pHe8bBAxSZ2xR.json index a300aaf6..201233ce 100644 --- a/src/packs/items/consumables/consumable_Major_Health_Potion_cM7pHe8bBAxSZ2xR.json +++ b/src/packs/items/consumables/consumable_Major_Health_Potion_cM7pHe8bBAxSZ2xR.json @@ -84,6 +84,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Major_Stamina_Potion_I4cQ03xbxnc81EGa.json b/src/packs/items/consumables/consumable_Major_Stamina_Potion_I4cQ03xbxnc81EGa.json index 94e53a0c..3f7d2a00 100644 --- a/src/packs/items/consumables/consumable_Major_Stamina_Potion_I4cQ03xbxnc81EGa.json +++ b/src/packs/items/consumables/consumable_Major_Stamina_Potion_I4cQ03xbxnc81EGa.json @@ -84,6 +84,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Major_Stride_Potion_yK6eEDUrsPbZA8G0.json b/src/packs/items/consumables/consumable_Major_Stride_Potion_yK6eEDUrsPbZA8G0.json index cf754770..320a77a3 100644 --- a/src/packs/items/consumables/consumable_Major_Stride_Potion_yK6eEDUrsPbZA8G0.json +++ b/src/packs/items/consumables/consumable_Major_Stride_Potion_yK6eEDUrsPbZA8G0.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Minor_Health_Potion_tPfKtKRRjv8qdSqy.json b/src/packs/items/consumables/consumable_Minor_Health_Potion_tPfKtKRRjv8qdSqy.json index d0f90919..1e1e31f1 100644 --- a/src/packs/items/consumables/consumable_Minor_Health_Potion_tPfKtKRRjv8qdSqy.json +++ b/src/packs/items/consumables/consumable_Minor_Health_Potion_tPfKtKRRjv8qdSqy.json @@ -84,6 +84,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 60, diff --git a/src/packs/items/consumables/consumable_Minor_Stamina_Potion_b6vGSPFWOlzZZDLO.json b/src/packs/items/consumables/consumable_Minor_Stamina_Potion_b6vGSPFWOlzZZDLO.json index 1ef4efbf..9895b3ef 100644 --- a/src/packs/items/consumables/consumable_Minor_Stamina_Potion_b6vGSPFWOlzZZDLO.json +++ b/src/packs/items/consumables/consumable_Minor_Stamina_Potion_b6vGSPFWOlzZZDLO.json @@ -84,6 +84,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 60, diff --git a/src/packs/items/consumables/consumable_Mirror_of_Marigold_UFQVwgYOUZ88UxcH.json b/src/packs/items/consumables/consumable_Mirror_of_Marigold_UFQVwgYOUZ88UxcH.json index 7adaf3e6..ba3a3f17 100644 --- a/src/packs/items/consumables/consumable_Mirror_of_Marigold_UFQVwgYOUZ88UxcH.json +++ b/src/packs/items/consumables/consumable_Mirror_of_Marigold_UFQVwgYOUZ88UxcH.json @@ -40,6 +40,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 62, diff --git a/src/packs/items/consumables/consumable_Morphing_Clay_f1NHVSIHJJCIOaBl.json b/src/packs/items/consumables/consumable_Morphing_Clay_f1NHVSIHJJCIOaBl.json index 54aa6ccc..970cabd4 100644 --- a/src/packs/items/consumables/consumable_Morphing_Clay_f1NHVSIHJJCIOaBl.json +++ b/src/packs/items/consumables/consumable_Morphing_Clay_f1NHVSIHJJCIOaBl.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Mythic_Dust_Zsh2AvZr8EkGtLyw.json b/src/packs/items/consumables/consumable_Mythic_Dust_Zsh2AvZr8EkGtLyw.json index 342bf60b..e281399e 100644 --- a/src/packs/items/consumables/consumable_Mythic_Dust_Zsh2AvZr8EkGtLyw.json +++ b/src/packs/items/consumables/consumable_Mythic_Dust_Zsh2AvZr8EkGtLyw.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Ogre_Musk_qr1bosjFcUfuwq4B.json b/src/packs/items/consumables/consumable_Ogre_Musk_qr1bosjFcUfuwq4B.json index 39c8800b..874072cc 100644 --- a/src/packs/items/consumables/consumable_Ogre_Musk_qr1bosjFcUfuwq4B.json +++ b/src/packs/items/consumables/consumable_Ogre_Musk_qr1bosjFcUfuwq4B.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Potion_of_Stability_dvL8oaxpEF6jKvYN.json b/src/packs/items/consumables/consumable_Potion_of_Stability_dvL8oaxpEF6jKvYN.json index ddff33f0..ba2f2b30 100644 --- a/src/packs/items/consumables/consumable_Potion_of_Stability_dvL8oaxpEF6jKvYN.json +++ b/src/packs/items/consumables/consumable_Potion_of_Stability_dvL8oaxpEF6jKvYN.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 60, diff --git a/src/packs/items/consumables/consumable_Redthorn_Saliva_s2Exl2XFuoOhtIov.json b/src/packs/items/consumables/consumable_Redthorn_Saliva_s2Exl2XFuoOhtIov.json index 69edf2df..654470db 100644 --- a/src/packs/items/consumables/consumable_Redthorn_Saliva_s2Exl2XFuoOhtIov.json +++ b/src/packs/items/consumables/consumable_Redthorn_Saliva_s2Exl2XFuoOhtIov.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Replication_Parchment_yJkwz4AP6yhGo8Vj.json b/src/packs/items/consumables/consumable_Replication_Parchment_yJkwz4AP6yhGo8Vj.json index 702d10ca..c2176ca0 100644 --- a/src/packs/items/consumables/consumable_Replication_Parchment_yJkwz4AP6yhGo8Vj.json +++ b/src/packs/items/consumables/consumable_Replication_Parchment_yJkwz4AP6yhGo8Vj.json @@ -40,6 +40,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Shrinking_Potion_HGixKenQwhyRAYNk.json b/src/packs/items/consumables/consumable_Shrinking_Potion_HGixKenQwhyRAYNk.json index 74e82995..7bf8c686 100644 --- a/src/packs/items/consumables/consumable_Shrinking_Potion_HGixKenQwhyRAYNk.json +++ b/src/packs/items/consumables/consumable_Shrinking_Potion_HGixKenQwhyRAYNk.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 62, diff --git a/src/packs/items/consumables/consumable_Sleeping_Sap_XZavUVlHEvE2srEt.json b/src/packs/items/consumables/consumable_Sleeping_Sap_XZavUVlHEvE2srEt.json index a6f70305..74fbf749 100644 --- a/src/packs/items/consumables/consumable_Sleeping_Sap_XZavUVlHEvE2srEt.json +++ b/src/packs/items/consumables/consumable_Sleeping_Sap_XZavUVlHEvE2srEt.json @@ -85,6 +85,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 62, diff --git a/src/packs/items/consumables/consumable_Snap_Powder_cg6VtQ0eVZjDdcK0.json b/src/packs/items/consumables/consumable_Snap_Powder_cg6VtQ0eVZjDdcK0.json index dd129914..adcf8a31 100644 --- a/src/packs/items/consumables/consumable_Snap_Powder_cg6VtQ0eVZjDdcK0.json +++ b/src/packs/items/consumables/consumable_Snap_Powder_cg6VtQ0eVZjDdcK0.json @@ -85,6 +85,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Stamina_Potion_hf3k1POoVSooJyN2.json b/src/packs/items/consumables/consumable_Stamina_Potion_hf3k1POoVSooJyN2.json index 6a4a3335..9cb4716e 100644 --- a/src/packs/items/consumables/consumable_Stamina_Potion_hf3k1POoVSooJyN2.json +++ b/src/packs/items/consumables/consumable_Stamina_Potion_hf3k1POoVSooJyN2.json @@ -84,6 +84,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Stardrop_y4c1jrlHrf0wBWOq.json b/src/packs/items/consumables/consumable_Stardrop_y4c1jrlHrf0wBWOq.json index 7b244715..1a8800cd 100644 --- a/src/packs/items/consumables/consumable_Stardrop_y4c1jrlHrf0wBWOq.json +++ b/src/packs/items/consumables/consumable_Stardrop_y4c1jrlHrf0wBWOq.json @@ -71,6 +71,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 62, diff --git a/src/packs/items/consumables/consumable_Stride_Potion_lNtcrkgFGOJNaroE.json b/src/packs/items/consumables/consumable_Stride_Potion_lNtcrkgFGOJNaroE.json index 76d43d33..94baa901 100644 --- a/src/packs/items/consumables/consumable_Stride_Potion_lNtcrkgFGOJNaroE.json +++ b/src/packs/items/consumables/consumable_Stride_Potion_lNtcrkgFGOJNaroE.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 60, diff --git a/src/packs/items/consumables/consumable_Sun_Tree_Sap_kwexUzdM9wm1Qums.json b/src/packs/items/consumables/consumable_Sun_Tree_Sap_kwexUzdM9wm1Qums.json index 82f02518..48a61a28 100644 --- a/src/packs/items/consumables/consumable_Sun_Tree_Sap_kwexUzdM9wm1Qums.json +++ b/src/packs/items/consumables/consumable_Sun_Tree_Sap_kwexUzdM9wm1Qums.json @@ -64,6 +64,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Sweet_Moss_GrDrRqWgv7gvl9vn.json b/src/packs/items/consumables/consumable_Sweet_Moss_GrDrRqWgv7gvl9vn.json index 5034e482..f8b6fbb7 100644 --- a/src/packs/items/consumables/consumable_Sweet_Moss_GrDrRqWgv7gvl9vn.json +++ b/src/packs/items/consumables/consumable_Sweet_Moss_GrDrRqWgv7gvl9vn.json @@ -159,6 +159,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 62, diff --git a/src/packs/items/consumables/consumable_Unstable_Arcane_Shard_mUepnLbkvFk0ha4Z.json b/src/packs/items/consumables/consumable_Unstable_Arcane_Shard_mUepnLbkvFk0ha4Z.json index 2fa73e49..96b83780 100644 --- a/src/packs/items/consumables/consumable_Unstable_Arcane_Shard_mUepnLbkvFk0ha4Z.json +++ b/src/packs/items/consumables/consumable_Unstable_Arcane_Shard_mUepnLbkvFk0ha4Z.json @@ -91,6 +91,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 60, diff --git a/src/packs/items/consumables/consumable_Varik_Leaves_hvy5BkG3F6iOIXTx.json b/src/packs/items/consumables/consumable_Varik_Leaves_hvy5BkG3F6iOIXTx.json index 8588d8e6..79f4d11e 100644 --- a/src/packs/items/consumables/consumable_Varik_Leaves_hvy5BkG3F6iOIXTx.json +++ b/src/packs/items/consumables/consumable_Varik_Leaves_hvy5BkG3F6iOIXTx.json @@ -85,6 +85,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 60, diff --git a/src/packs/items/consumables/consumable_Vial_of_Darksmoke_Nwv5ydGf0MWnzq1n.json b/src/packs/items/consumables/consumable_Vial_of_Darksmoke_Nwv5ydGf0MWnzq1n.json index b956477d..9de41467 100644 --- a/src/packs/items/consumables/consumable_Vial_of_Darksmoke_Nwv5ydGf0MWnzq1n.json +++ b/src/packs/items/consumables/consumable_Vial_of_Darksmoke_Nwv5ydGf0MWnzq1n.json @@ -40,6 +40,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/src/packs/items/consumables/consumable_Vial_of_Moondrip_VqEX5YwK5oL3r1t6.json b/src/packs/items/consumables/consumable_Vial_of_Moondrip_VqEX5YwK5oL3r1t6.json index 31586ef8..42359fe8 100644 --- a/src/packs/items/consumables/consumable_Vial_of_Moondrip_VqEX5YwK5oL3r1t6.json +++ b/src/packs/items/consumables/consumable_Vial_of_Moondrip_VqEX5YwK5oL3r1t6.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 60, diff --git a/src/packs/items/consumables/consumable_Wingsprout_n10vozlmosVR6lo4.json b/src/packs/items/consumables/consumable_Wingsprout_n10vozlmosVR6lo4.json index 1bdd4bc0..7196b296 100644 --- a/src/packs/items/consumables/consumable_Wingsprout_n10vozlmosVR6lo4.json +++ b/src/packs/items/consumables/consumable_Wingsprout_n10vozlmosVR6lo4.json @@ -45,6 +45,7 @@ } }, "consumeOnUse": true, + "destroyOnEmpty": true, "attribution": { "source": "Daggerheart SRD", "page": 61, diff --git a/system.json b/system.json index 44c26886..cd0bce1f 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "1.9.5", + "version": "1.9.4", "compatibility": { "minimum": "13.346", "verified": "13.351", diff --git a/templates/sheets/items/consumable/settings.hbs b/templates/sheets/items/consumable/settings.hbs index 71bb2a83..7cc75f6f 100644 --- a/templates/sheets/items/consumable/settings.hbs +++ b/templates/sheets/items/consumable/settings.hbs @@ -10,5 +10,8 @@ {{localize "DAGGERHEART.ITEMS.Consumable.consumeOnUse"}} {{formField systemFields.consumeOnUse value=source.system.consumeOnUse}} + + {{localize "DAGGERHEART.ITEMS.Consumable.destroyOnEmpty"}} + {{formField systemFields.destroyOnEmpty value=source.system.destroyOnEmpty}} \ No newline at end of file