mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
[Fix] Itemlink Redux Revengeance (#399)
* Small random fixes * Added use of ItemLinkFields * Multiclass levelup fixes * Fixed our onCreate methods unintentionally being run on all clients * Remade apps handling * Added for all class items and subclass * Restored foreignDocumentUuidField * Improved * PR fxies * Fixed tooltip enrichment * . * Reverted silly change
This commit is contained in:
parent
fcba5041e9
commit
2a4777f1a0
61 changed files with 648 additions and 489 deletions
|
|
@ -1,7 +1,7 @@
|
|||
const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api;
|
||||
|
||||
export default class ActionSelectionDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||
constructor(item, event, options={}) {
|
||||
constructor(item, event, options = {}) {
|
||||
super(options);
|
||||
this.#item = item;
|
||||
this.#event = event;
|
||||
|
|
@ -24,7 +24,7 @@ export default class ActionSelectionDialog extends HandlebarsApplicationMixin(Ap
|
|||
|
||||
static PARTS = {
|
||||
actions: {
|
||||
template: "systems/daggerheart/templates/dialogs/actionSelect.hbs"
|
||||
template: 'systems/daggerheart/templates/dialogs/actionSelect.hbs'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -60,10 +60,10 @@ export default class ActionSelectionDialog extends HandlebarsApplicationMixin(Ap
|
|||
const actions = this.#item.system.actionsList,
|
||||
itemName = this.#item.name;
|
||||
return {
|
||||
...await super._prepareContext(options),
|
||||
...(await super._prepareContext(options)),
|
||||
actions,
|
||||
itemName
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
static async #onChooseAction(event, button) {
|
||||
|
|
@ -80,8 +80,8 @@ export default class ActionSelectionDialog extends HandlebarsApplicationMixin(Ap
|
|||
static create(item, event, options) {
|
||||
return new Promise(resolve => {
|
||||
const dialog = new this(item, event, options);
|
||||
dialog.addEventListener("close", () => resolve(dialog.action), { once: true });
|
||||
dialog.addEventListener('close', () => resolve(dialog.action), { once: true });
|
||||
dialog.render({ force: true });
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue