mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[Fix] Beastform Fixes (#1288)
* Fixed Beastforms getting stuck * Made the wildcard image select dialog scrollable * Beastform button shifts to cancelBeastform
This commit is contained in:
parent
91b1b92d19
commit
fcb9c032ef
9 changed files with 40 additions and 30 deletions
|
|
@ -31,6 +31,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
toggleEquipItem: CharacterSheet.#toggleEquipItem,
|
||||
toggleResourceDice: CharacterSheet.#toggleResourceDice,
|
||||
handleResourceDice: CharacterSheet.#handleResourceDice,
|
||||
cancelBeastform: CharacterSheet.#cancelBeastform,
|
||||
useDowntime: this.useDowntime
|
||||
},
|
||||
window: {
|
||||
|
|
@ -219,6 +220,8 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
}
|
||||
};
|
||||
|
||||
context.beastformActive = this.document.effects.find(x => x.type === 'beastform');
|
||||
|
||||
const homebrewCurrency = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).currency;
|
||||
if (homebrewCurrency.enabled) {
|
||||
context.inventory.currency = homebrewCurrency;
|
||||
|
|
@ -848,6 +851,15 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static async #cancelBeastform(_, target) {
|
||||
const item = await getDocFromElement(target);
|
||||
if (!item) return;
|
||||
game.system.api.fields.ActionFields.BeastformField.handleActiveTransformations.call(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Open the downtime application.
|
||||
* @type {ApplicationClickAction}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue