Make the player sheet list use the inferred minimum and actually update the embedded document

This commit is contained in:
Oliver 2026-04-25 19:51:30 -06:00
parent d2599d0db3
commit edceb5b384
2 changed files with 8 additions and 1 deletions

View file

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

View file

@ -8,9 +8,10 @@
<input
type="number"
id="{{uuid}}-value"
data-foreign-uuid="{{uuid}}"
data-foreign-name="system.value"
value="{{ system.value }}"
min="{{ system.min }}"
min="{{ system.inferredMinimum }}"
max="{{ system.max }}"
>
</li>