From edceb5b38494b30655b6b01a80fa1b35d69b7a12 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 25 Apr 2026 19:51:30 -0600 Subject: [PATCH] Make the player sheet list use the inferred minimum and actually update the embedded document --- module/data/Item/attribute.mjs | 6 ++++++ templates/PlayerSheet/tabs/attributes/attribute.hbs | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/module/data/Item/attribute.mjs b/module/data/Item/attribute.mjs index 6d87fb2..b8e6ea3 100644 --- a/module/data/Item/attribute.mjs +++ b/module/data/Item/attribute.mjs @@ -101,5 +101,11 @@ export class AttributeItemData extends foundry.abstract.TypeDataModel { get isRange() { return this.max !== null; }; + + get inferredMinimum() { + if (this.isRange) { + return this.min ?? 0; + }; + }; // #endregion Methods }; diff --git a/templates/PlayerSheet/tabs/attributes/attribute.hbs b/templates/PlayerSheet/tabs/attributes/attribute.hbs index c168c3e..7886b62 100644 --- a/templates/PlayerSheet/tabs/attributes/attribute.hbs +++ b/templates/PlayerSheet/tabs/attributes/attribute.hbs @@ -8,9 +8,10 @@