mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 04:31:07 +01:00
Merge branch 'development' into feature/death-moves
This commit is contained in:
commit
cec0bb75ae
11 changed files with 42 additions and 24 deletions
|
|
@ -5,10 +5,7 @@ export default class DhSceneConfigSettings extends foundry.applications.sheets.S
|
|||
super(options);
|
||||
|
||||
Hooks.on(socketEvent.Refresh, ({ refreshType }) => {
|
||||
if (refreshType === RefreshType.Scene) {
|
||||
this.daggerheartFlag = new game.system.api.data.scenes.DHScene(this.document.flags.daggerheart);
|
||||
this.render();
|
||||
}
|
||||
if (refreshType === RefreshType.Scene) this.render();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -42,7 +39,9 @@ export default class DhSceneConfigSettings extends foundry.applications.sheets.S
|
|||
|
||||
async _preRender(context, options) {
|
||||
await super._preFirstRender(context, options);
|
||||
this.daggerheartFlag = new game.system.api.data.scenes.DHScene(this.document.flags.daggerheart);
|
||||
|
||||
if (!options.internalRefresh)
|
||||
this.daggerheartFlag = new game.system.api.data.scenes.DHScene(this.document.flags.daggerheart);
|
||||
}
|
||||
|
||||
_attachPartListeners(partId, htmlElement, options) {
|
||||
|
|
@ -52,7 +51,7 @@ export default class DhSceneConfigSettings extends foundry.applications.sheets.S
|
|||
case 'dh':
|
||||
htmlElement.querySelector('#rangeMeasurementSetting')?.addEventListener('change', async event => {
|
||||
this.daggerheartFlag.updateSource({ rangeMeasurement: { setting: event.target.value } });
|
||||
this.render();
|
||||
this.render({ internalRefresh: true });
|
||||
});
|
||||
|
||||
const dragArea = htmlElement.querySelector('.scene-environments');
|
||||
|
|
@ -69,7 +68,7 @@ export default class DhSceneConfigSettings extends foundry.applications.sheets.S
|
|||
await this.daggerheartFlag.updateSource({
|
||||
sceneEnvironments: [...this.daggerheartFlag.sceneEnvironments, data.uuid]
|
||||
});
|
||||
this.render();
|
||||
this.render({ internalRefresh: true });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -92,7 +91,7 @@ export default class DhSceneConfigSettings extends foundry.applications.sheets.S
|
|||
(_, index) => index !== Number.parseInt(button.dataset.index)
|
||||
)
|
||||
});
|
||||
this.render();
|
||||
this.render({ internalRefresh: true });
|
||||
}
|
||||
|
||||
/** @override */
|
||||
|
|
|
|||
|
|
@ -505,6 +505,7 @@ export default function DHApplicationMixin(Base) {
|
|||
const doc = await getDocFromElement(target),
|
||||
action = doc?.system?.attack ?? doc;
|
||||
const config = action.prepareConfig(event);
|
||||
config.effects = Array.from(await this.document.allApplicableEffects());
|
||||
config.hasRoll = false;
|
||||
return action && action.workflow.get('damage').execute(config, null, true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,6 +230,14 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
result.flatMap(r => r),
|
||||
'name'
|
||||
);
|
||||
|
||||
/* If any noticeable slowdown occurs, consider replacing with enriching description on clicking to expand descriptions */
|
||||
for (const item of this.items) {
|
||||
item.system.enrichedDescription =
|
||||
(await item.system.getEnrichedDescription?.()) ??
|
||||
(await foundry.applications.ux.TextEditor.implementation.enrichHTML(item.description));
|
||||
}
|
||||
|
||||
this.fieldFilter = this._createFieldFilter();
|
||||
|
||||
if (this.presets?.filter) {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export default class DhSceneNavigation extends foundry.applications.ui.SceneNavi
|
|||
const environments = daggerheartInfo.sceneEnvironments.filter(
|
||||
x => x && x.testUserPermission(game.user, 'LIMITED')
|
||||
);
|
||||
const hasEnvironments = environments.length > 0;
|
||||
const hasEnvironments = environments.length > 0 && x.isView;
|
||||
return {
|
||||
...x,
|
||||
hasEnvironments,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue