mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[Feature] ActiveEffect Autocomplete (#338)
* Fixed translation of TrackedAttributeChoices * Styling improvements * Added hints * fix autocomplete style, fix tagify style, fix magical and physical tag style and fix lang in details adversary settings * Removed commented out code * Some companion fixes --------- Co-authored-by: moliloo <dev.murilobrito@gmail.com>
This commit is contained in:
parent
37c1d7ad88
commit
0dd5b53313
31 changed files with 501 additions and 171 deletions
20
module/applications/sheets-configs/token-config.mjs
Normal file
20
module/applications/sheets-configs/token-config.mjs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
export default class DhTokenConfig extends foundry.applications.sheets.TokenConfig {
|
||||
/** @inheritDoc */
|
||||
async _prepareResourcesTab() {
|
||||
const token = this.token;
|
||||
const usesTrackableAttributes = !foundry.utils.isEmpty(CONFIG.Actor.trackableAttributes);
|
||||
const attributeSource =
|
||||
this.actor?.system instanceof foundry.abstract.DataModel && usesTrackableAttributes
|
||||
? this.actor?.type
|
||||
: this.actor?.system;
|
||||
const TokenDocument = foundry.utils.getDocumentClass('Token');
|
||||
const attributes = TokenDocument.getTrackedAttributes(attributeSource);
|
||||
return {
|
||||
barAttributes: TokenDocument.getTrackedAttributeChoices(attributes, attributeSource),
|
||||
bar1: token.getBarAttribute?.('bar1'),
|
||||
bar2: token.getBarAttribute?.('bar2'),
|
||||
turnMarkerModes: DhTokenConfig.TURN_MARKER_MODES,
|
||||
turnMarkerAnimations: CONFIG.Combat.settings.turnMarkerAnimations
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue