mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
help?
This commit is contained in:
parent
6a8d9eb067
commit
3040924609
1 changed files with 31 additions and 1 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
//Setting RollTable
|
//Setting RollTable
|
||||||
|
|
||||||
|
//import DhRollTableData from 'systems/daggerheart/module/data/rollTable.mjs';
|
||||||
export default class DhRollTableSheet extends foundry.applications.sheets.RollTableSheet {
|
export default class DhRollTableSheet extends foundry.applications.sheets.RollTableSheet {
|
||||||
static buildParts() {
|
static buildParts() {
|
||||||
const { footer, ...parts } = super.PARTS;
|
const { footer, ...parts } = super.PARTS;
|
||||||
|
|
@ -12,9 +14,37 @@ export default class DhRollTableSheet extends foundry.applications.sheets.RollTa
|
||||||
static PARTS = DhRollTableSheet.buildParts();
|
static PARTS = DhRollTableSheet.buildParts();
|
||||||
|
|
||||||
static DEFAULT_OPTIONS = {
|
static DEFAULT_OPTIONS = {
|
||||||
classes: ['daggerheart', 'sheet', 'dh-style']
|
...super.DEFAULT_OPTIONS,
|
||||||
|
classes: ['daggerheart', 'sheet', 'dh-style'],
|
||||||
|
actions : {
|
||||||
|
addAltFormula: DhRollTableSheet.#onAddAltFormula,
|
||||||
|
removeAltFormula: DhRollTableSheet.#onRemoveAltFormula
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
async _preparePartContext(partId, context, options) {
|
||||||
|
context = await super._preparePartContext(partId,context,options);
|
||||||
|
switch(partId) {
|
||||||
|
case 'summary':
|
||||||
|
context.flagData = this.daggerheartFlag
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
async _preRender(context,options) {
|
||||||
|
await super._preFirstRender(context,options);
|
||||||
|
if (!options.internalReferesh)
|
||||||
|
this.daggerheartFlag = new game.system.api.data.scenes.DHScene(this.document.flags.daggerheart)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
async _processSubmitData(event, form, submitData, options) {
|
||||||
|
submitData.flags.daggerheart = this.daggerheartFlag.toObject();
|
||||||
|
|
||||||
|
super._processSubmitData(event, form, submitData, options);
|
||||||
|
}
|
||||||
|
|
||||||
static actions = {
|
static actions = {
|
||||||
addAltFormula: DhRollTableSheet.#onAddAltFormula,
|
addAltFormula: DhRollTableSheet.#onAddAltFormula,
|
||||||
removeAltFormula: DhRollTableSheet.#onRemoveAltFormula
|
removeAltFormula: DhRollTableSheet.#onRemoveAltFormula
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue