mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-07 21:34:16 +02:00
Fix class domains when setting max domains to null or 0
This commit is contained in:
parent
da11510e02
commit
07f8eb8f09
1 changed files with 6 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ export default class DhHomebrew extends foundry.abstract.DataModel {
|
||||||
maxDomains: new fields.NumberField({
|
maxDomains: new fields.NumberField({
|
||||||
required: true,
|
required: true,
|
||||||
integer: true,
|
integer: true,
|
||||||
min: 1,
|
min: 0,
|
||||||
initial: 2,
|
initial: 2,
|
||||||
label: 'DAGGERHEART.SETTINGS.Homebrew.FIELDS.maxDomains.label'
|
label: 'DAGGERHEART.SETTINGS.Homebrew.FIELDS.maxDomains.label'
|
||||||
}),
|
}),
|
||||||
|
|
@ -196,6 +196,11 @@ export default class DhHomebrew extends foundry.abstract.DataModel {
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_initialize(options) {
|
||||||
|
super._initialize(options);
|
||||||
|
this.maxDomains ||= Infinity;
|
||||||
|
}
|
||||||
|
|
||||||
/** Invoked by the setting when data changes */
|
/** Invoked by the setting when data changes */
|
||||||
handleChange() {
|
handleChange() {
|
||||||
if (this.maxFear) {
|
if (this.maxFear) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue