mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 10:29:54 +02:00
Merged with main
This commit is contained in:
commit
2780ba3f40
86 changed files with 1957 additions and 1984 deletions
|
|
@ -7,7 +7,7 @@ export default class AdversarySheet extends DHBaseActorSheet {
|
|||
/** @inheritDoc */
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ['adversary'],
|
||||
position: { width: 660, height: 766 },
|
||||
position: { width: 645, height: 750 },
|
||||
window: { resizable: true },
|
||||
actions: {
|
||||
toggleHitPoints: AdversarySheet.#toggleHitPoints,
|
||||
|
|
@ -58,12 +58,13 @@ export default class AdversarySheet extends DHBaseActorSheet {
|
|||
template: 'systems/daggerheart/templates/sheets/actors/adversary/features.hbs',
|
||||
scrollable: ['.feature-section']
|
||||
},
|
||||
notes: {
|
||||
template: 'systems/daggerheart/templates/sheets/actors/adversary/notes.hbs'
|
||||
},
|
||||
effects: {
|
||||
template: 'systems/daggerheart/templates/sheets/actors/adversary/effects.hbs',
|
||||
scrollable: ['.effects-sections']
|
||||
},
|
||||
notes: {
|
||||
template: 'systems/daggerheart/templates/sheets/actors/adversary/notes.hbs',
|
||||
scrollable: ['.editor-content']
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1057,7 +1057,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
direction: 'DOWN'
|
||||
});
|
||||
|
||||
html.querySelectorAll('.armor-slot').forEach(element => {
|
||||
html.querySelectorAll('.armor .slot').forEach(element => {
|
||||
element.addEventListener('click', CharacterSheet.armorSourcePipUpdate);
|
||||
});
|
||||
}
|
||||
|
|
@ -1072,7 +1072,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
|
||||
/** Update specific armor source */
|
||||
static async armorSourcePipUpdate(event) {
|
||||
const target = event.target.closest('.armor-slot');
|
||||
const target = event.target.closest('.slot');
|
||||
const { uuid, value } = target.dataset;
|
||||
const document = await foundry.utils.fromUuid(uuid);
|
||||
|
||||
|
|
@ -1100,7 +1100,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
}
|
||||
|
||||
const container = target.closest('.slot-bar');
|
||||
for (const armorSlot of container.querySelectorAll('.armor-slot i')) {
|
||||
for (const armorSlot of container.querySelectorAll('.armor .slot i')) {
|
||||
const index = Number.parseInt(armorSlot.dataset.index);
|
||||
if (decreasing && index >= newCurrent) {
|
||||
armorSlot.classList.remove('fa-shield');
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ export default function DHApplicationMixin(Base) {
|
|||
_preSyncPartState(partId, newElement, priorElement, state) {
|
||||
super._preSyncPartState(partId, newElement, priorElement, state);
|
||||
for (const el of priorElement.querySelectorAll('.extensible.extended')) {
|
||||
const { actionId, itemUuid } = el.parentElement.dataset;
|
||||
const { actionId, itemUuid } = el.closest('[data-item-uuid], [data-action-id]').dataset;
|
||||
const selector = `${actionId ? `[data-action-id="${actionId}"]` : `[data-item-uuid="${itemUuid}"]`} .extensible`;
|
||||
const newExtensible = newElement.querySelector(selector);
|
||||
newExtensible?.classList.add('extended');
|
||||
|
|
@ -603,7 +603,7 @@ export default function DHApplicationMixin(Base) {
|
|||
const doc = await fromUuid(itemUuid);
|
||||
|
||||
//get inventory-item description element
|
||||
const descriptionElement = el.querySelector('.invetory-description');
|
||||
const descriptionElement = el.querySelector('.inventory-description');
|
||||
if (!doc || !descriptionElement) continue;
|
||||
|
||||
// localize the description (idk if it's still necessary)
|
||||
|
|
|
|||
|
|
@ -39,6 +39,12 @@ export default class DhEffectsDisplay extends HandlebarsApplicationMixin(Applica
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Debounce and slightly delayed request to re-render this panel. Necessary for situations where it is not possible
|
||||
* to properly wait for promises to resolve before refreshing the UI.
|
||||
*/
|
||||
refresh = foundry.utils.debounce(this.render.bind(this), 50);
|
||||
|
||||
get element() {
|
||||
return document.body.querySelector('.daggerheart.dh-style.effects-display');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue