mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
hook?
This commit is contained in:
parent
8f9f0617cd
commit
6a8d9eb067
2 changed files with 39 additions and 3 deletions
|
|
@ -10,15 +10,23 @@ export default class DhRollTableSheet extends foundry.applications.sheets.RollTa
|
||||||
}
|
}
|
||||||
|
|
||||||
static PARTS = DhRollTableSheet.buildParts();
|
static PARTS = DhRollTableSheet.buildParts();
|
||||||
|
|
||||||
|
static DEFAULT_OPTIONS = {
|
||||||
|
classes: ['daggerheart', 'sheet', 'dh-style']
|
||||||
|
};
|
||||||
|
|
||||||
static actions = {
|
static actions = {
|
||||||
addAltFormula: DhRollTableSheet.#onAddAltFormula,
|
addAltFormula: DhRollTableSheet.#onAddAltFormula,
|
||||||
removeAltForuma: DhRollTableSheet.#onRemoveAltFormula
|
removeAltFormula: DhRollTableSheet.#onRemoveAltFormula
|
||||||
};
|
};
|
||||||
|
|
||||||
//Add formulafield
|
//Add formulafield
|
||||||
static async #onAddAltFormula(event, target) {}
|
static async #onAddAltFormula(event, target) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//Remove formulafield
|
//Remove formulafield
|
||||||
static async #onRemoveAltFormula(event, target) {}
|
static async #onRemoveAltFormula(event, target) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
28
module/data/rollTable.mjs
Normal file
28
module/data/rollTable.mjs
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
//Extra definitions for RollTable
|
||||||
|
export default class DhRollTableData 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
|
||||||
|
}),
|
||||||
|
altFormula: new fields.ArrayField(
|
||||||
|
new fields.SchemaField({
|
||||||
|
key: new fields.StringField({
|
||||||
|
required:false,
|
||||||
|
nullable:false,
|
||||||
|
blank:true
|
||||||
|
}),
|
||||||
|
formula: new fields.StringField({
|
||||||
|
required:true,
|
||||||
|
blank:false,
|
||||||
|
initial:"1d4" //Filler value
|
||||||
|
})
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue