Remove methods that don't need to be overridden for StringField
This commit is contained in:
parent
5f1dc53a91
commit
ee77f10957
1 changed files with 6 additions and 10 deletions
|
|
@ -4,7 +4,7 @@ import { statDice } from "../../config.mjs";
|
|||
* A subclass of StringField that allows ActiveEffects to integrate with dice
|
||||
* values and increase/decrease the value step-wise according to the dice ladder.
|
||||
*/
|
||||
export class DiceField extends foundry.data.fields.DataField {
|
||||
export class DiceField extends foundry.data.fields.StringField {
|
||||
static get _defaults() {
|
||||
return foundry.utils.mergeObject(super._defaults, {
|
||||
trim: true,
|
||||
|
|
@ -22,15 +22,6 @@ export class DiceField extends foundry.data.fields.DataField {
|
|||
console.log(this.choices)
|
||||
};
|
||||
|
||||
applyChange(...args) {
|
||||
console.log(`DiceField.applyChange`, args);
|
||||
return super.applyChange(...args)
|
||||
}
|
||||
|
||||
_cast(value) {
|
||||
return String(value);
|
||||
}
|
||||
|
||||
_castChangeDelta(delta) {
|
||||
console.log(`DiceField._castChangeDelta(${delta})`)
|
||||
return parseInt(delta) ?? 0;
|
||||
|
|
@ -70,4 +61,9 @@ export class DiceField extends foundry.data.fields.DataField {
|
|||
console.log(`.dungeon | Post: value=${value}; delta=${delta}`);
|
||||
return value
|
||||
};
|
||||
|
||||
_applyChangeCustom(...args) {
|
||||
console.log(`.dungeon | Dicefield._applyChangeCustom`)
|
||||
return super._applyChangeCustom(...args);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue