mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-11 03:27:08 +01:00
Merge branch 'main' of https://github.com/Foundryborne/daggerheart into feature/271-new-style-dialog-roll
This commit is contained in:
commit
b57706f715
1 changed files with 19 additions and 1 deletions
|
|
@ -211,17 +211,18 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
return { primary: primaryTabs, secondary: secondaryTabs };
|
return { primary: primaryTabs, secondary: secondaryTabs };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**@inheritdoc */
|
||||||
async _onFirstRender(context, options) {
|
async _onFirstRender(context, options) {
|
||||||
await super._onFirstRender(context, options);
|
await super._onFirstRender(context, options);
|
||||||
|
|
||||||
this._createContextMenues();
|
this._createContextMenues();
|
||||||
this._createFilterMenus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritDoc */
|
/** @inheritDoc */
|
||||||
async _onRender(context, options) {
|
async _onRender(context, options) {
|
||||||
await super._onRender(context, options);
|
await super._onRender(context, options);
|
||||||
|
|
||||||
|
this._createFilterMenus();
|
||||||
this._createSearchFilter();
|
this._createSearchFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -409,6 +410,10 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/* Search Inputs */
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create and initialize search filter instances for the inventory and loadout sections.
|
* Create and initialize search filter instances for the inventory and loadout sections.
|
||||||
*
|
*
|
||||||
|
|
@ -572,6 +577,7 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
li.hidden = !(search.has(item.id) && matchesMenu);
|
li.hidden = !(search.has(item.id) && matchesMenu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
async mapFeatureType(data, configType) {
|
async mapFeatureType(data, configType) {
|
||||||
|
|
@ -594,6 +600,18 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static async rollAttribute(event, button) {
|
||||||
|
const abilityLabel = game.i18n.localize(abilities[button.dataset.attribute].label);
|
||||||
|
const config = {
|
||||||
|
event: event,
|
||||||
|
title: game.i18n.format('DAGGERHEART.Chat.DualityRoll.AbilityCheckTitle', { ability: abilityLabel }),
|
||||||
|
roll: {
|
||||||
|
trait: button.dataset.attribute
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.document.diceRoll(config);
|
||||||
|
}
|
||||||
|
|
||||||
static async toggleMarks(_, button) {
|
static async toggleMarks(_, button) {
|
||||||
const markValue = Number.parseInt(button.dataset.value);
|
const markValue = Number.parseInt(button.dataset.value);
|
||||||
const newValue = this.document.system.armor.system.marks.value >= markValue ? markValue - 1 : markValue;
|
const newValue = this.document.system.armor.system.marks.value >= markValue ? markValue - 1 : markValue;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue