This commit is contained in:
WBHarry 2026-01-15 18:35:24 +01:00
parent 3040924609
commit 89f350a013
3 changed files with 42 additions and 53 deletions

View file

@ -1,6 +1,7 @@
export { default as DhCombat } from './combat.mjs';
export { default as DhCombatant } from './combatant.mjs';
export { default as DhTagTeamRoll } from './tagTeamRoll.mjs';
export { default as DhRollTable } from './rollTable.mjs';
export * as countdowns from './countdowns.mjs';
export * as actions from './action/_module.mjs';

View file

@ -1,28 +1,27 @@
import FormulaField from './fields/formulaField.mjs';
//Extra definitions for RollTable
export default class DhRollTableData extends foundry.abstract.TypeDataModel {
static defineSchema(){
export default class DhRollTable extends foundry.abstract.TypeDataModel {
static defineSchema() {
const fields = foundry.data.fields;
return{
formulaName: new fields.StringField({ // This is to give a name to go together with the core.formula
required:true,
nullable: false,
initial: 'Formula' // Should be a translation
return {
formulaName: new fields.StringField({
// This is to give a name to go together with the core.formula
required: true,
nullable: false,
initial: 'Formula' // Should be a translation
}),
altFormula: new fields.ArrayField(
new fields.SchemaField({
key: new fields.StringField({
required:false,
nullable:false,
blank:true
required: false,
nullable: false,
blank: true
}),
formula: new fields.StringField({
required:true,
blank:false,
initial:"1d4" //Filler value
})
formula: new FormulaField()
})
)
}
};
}
}
}