Replaced MappingField with FoundryCore TypedObjectField. Raised system foundry version to 13.344. Added styles/daggerheart.css to .prettierignore (#45)

This commit is contained in:
WBHarry 2025-05-24 21:09:39 +02:00 committed by GitHub
parent 7a03e4146c
commit e53922fc51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 18 additions and 154 deletions

View file

@ -1,11 +1,10 @@
import DaggerheartAction from '../action.mjs';
import { MappingField } from '../fields.mjs';
export default class DhpEffects extends foundry.abstract.TypeDataModel {
static defineSchema() {
const fields = foundry.data.fields;
return {
effects: new MappingField(
effects: new fields.TypedObjectField(
new fields.SchemaField({
type: new fields.StringField({ choices: Object.keys(SYSTEM.EFFECTS.effectTypes) }),
valueType: new fields.StringField({ choices: Object.keys(SYSTEM.EFFECTS.valueTypes) }),
@ -23,7 +22,7 @@ export default class DhpEffects extends foundry.abstract.TypeDataModel {
{ choices: Object.keys(SYSTEM.EFFECTS.applyLocations) },
{ nullable: true, initial: null }
),
applyLocationChoices: new MappingField(new fields.StringField({}), {
applyLocationChoices: new fields.TypedObjectField(new fields.StringField({}), {
nullable: true,
initial: null
}),