daggerheart/module/data/fields/triggerField.mjs
2026-01-03 02:50:47 +01:00

16 lines
550 B
JavaScript

export default class TriggerField extends foundry.data.fields.SchemaField {
constructor(context) {
super(
{
trigger: new foundry.data.fields.StringField({
nullable: false,
blank: false,
initial: CONFIG.DH.TRIGGER.triggers.dualityRoll.id,
choices: CONFIG.DH.TRIGGER.triggers
}),
command: new foundry.data.fields.JavaScriptField({ async: true })
},
context
);
}
}