Make the player sheet list use the inferred minimum and actually update the embedded document
This commit is contained in:
parent
d2599d0db3
commit
edceb5b384
2 changed files with 8 additions and 1 deletions
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue