mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
.
This commit is contained in:
parent
eb954b7ef6
commit
db8c2e29c1
6 changed files with 93 additions and 12 deletions
|
|
@ -1,8 +1,15 @@
|
|||
import { RefreshType, socketEvent } from '../../systemRegistration/socket.mjs';
|
||||
|
||||
export default class DhSceneConfigSettings extends foundry.applications.sheets.SceneConfig {
|
||||
constructor(options = {}) {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
|
||||
this.daggerheartFlag = new game.system.api.data.scenes.DHScene(this.document.flags.daggerheart);
|
||||
Hooks.on(socketEvent.Refresh, ({ refreshType }) => {
|
||||
if (refreshType === RefreshType.Scene) {
|
||||
this.daggerheartFlag = new game.system.api.data.scenes.DHScene(this.document.flags.daggerheart);
|
||||
this.render();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
@ -33,6 +40,11 @@ export default class DhSceneConfigSettings extends foundry.applications.sheets.S
|
|||
|
||||
static TABS = DhSceneConfigSettings.buildTabs();
|
||||
|
||||
async _preFirstRender(context, options) {
|
||||
await super._preFirstRender(context, options);
|
||||
this.daggerheartFlag = new game.system.api.data.scenes.DHScene(this.document.flags.daggerheart);
|
||||
}
|
||||
|
||||
_attachPartListeners(partId, htmlElement, options) {
|
||||
super._attachPartListeners(partId, htmlElement, options);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue