narrat 3.9.4 → 3.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3381,7 +3381,7 @@ export declare const sourceAllStores: {
3381
3381
  remove(item: import("../stores/inventory-store").ItemState): void;
3382
3382
  deleteItem(id: string): void;
3383
3383
  canUseItem(item: import("../stores/inventory-store").ItemState): boolean;
3384
- useItem(item: import("../stores/inventory-store").ItemState): void;
3384
+ useItem(item: import("../stores/inventory-store").ItemState): boolean;
3385
3385
  }>;
3386
3386
  readonly config: "items";
3387
3387
  readonly save: "inventory";
package/dist/narrat.es.js CHANGED
@@ -41757,7 +41757,7 @@ const _B = E.Type.Object({
41757
41757
  function Rge(e) {
41758
41758
  return e === Vg || e === S_ || e === Nge || e === qg;
41759
41759
  }
41760
- const Dge = "3.9.4", Lge = /* @__PURE__ */ new Date("2024-01-27T14:01:19.800Z"), Fge = 400, Ug = 20, j_ = "@empty", SM = {
41760
+ const Dge = "3.9.5", Lge = /* @__PURE__ */ new Date("2024-01-29T20:23:34.278Z"), Fge = 400, Ug = 20, j_ = "@empty", SM = {
41761
41761
  background: j_
41762
41762
  }, Bge = E.Type.Optional(
41763
41763
  E.Type.Object({
@@ -44012,11 +44012,13 @@ const xo = gi("notifications", {
44012
44012
  return !!(t && t.onUse && !this.isInteractionTagBlocked(t.tag) && !((n = xr().currentDialog) != null && n.choices));
44013
44013
  },
44014
44014
  useItem(e) {
44015
- const t = Ts(e.id);
44016
- if (e && this.canUseItem(e) && t) {
44017
- const n = t.onUse;
44018
- close(), Al("onItemUsed"), n.action === "jump" ? yn().jumpToLabel(n.label) : n.action === "run" ? yn().runThenGoBackToPreviousDialog(n.label, !0) : Tt(`Unknown action ${n.action}`);
44015
+ let t = !1;
44016
+ const n = Ts(e.id);
44017
+ if (e && this.canUseItem(e) && n) {
44018
+ const r = n.onUse;
44019
+ t = !0, Al("onItemUsed"), r.action === "jump" ? yn().jumpToLabel(r.label) : r.action === "run" ? yn().runThenGoBackToPreviousDialog(r.label, !0) : (t = !1, Tt(`Unknown action ${r.action}`));
44019
44020
  }
44021
+ return t;
44020
44022
  }
44021
44023
  }
44022
44024
  }), Z1e = () => ({
@@ -57906,7 +57908,7 @@ const dOe = /* @__PURE__ */ Js(aOe, [["render", fOe]]), hOe = { class: "settings
57906
57908
  i.value = !1;
57907
57909
  }
57908
57910
  function c() {
57909
- n.useItem(o.value), a();
57911
+ n.useItem(o.value) && a();
57910
57912
  }
57911
57913
  return (f, l) => !o.value && f.section.items.length > 0 ? (Te(), Qe("div", qOe, [
57912
57914
  Vr(DOe, {