diff --git a/daggerheart.mjs b/daggerheart.mjs index 49ed7049..e418401a 100644 --- a/daggerheart.mjs +++ b/daggerheart.mjs @@ -243,14 +243,17 @@ Hooks.on('setup', () => { })) ]; - const actorCommon = { - bar: ['resources.stress'], - value: [] - }; const damageThresholds = ['damageThresholds.major', 'damageThresholds.severe']; const traits = Object.keys(game.system.api.data.actors.DhCharacter.schema.fields.traits.fields).map( trait => `traits.${trait}.value` ); + const resistance = Object.values(game.system.api.data.actors.DhCharacter.schema.fields.resistance.fields).flatMap( + type => Object.keys(type.fields).map(x => `resistance.${type.name}.${x}`) + ); + const actorCommon = { + bar: ['resources.stress'], + value: [...resistance] + }; CONFIG.Actor.trackableAttributes = { character: { bar: [...actorCommon.bar, 'resources.hitPoints', 'resources.hope'], diff --git a/lang/en.json b/lang/en.json index 618beefc..19317228 100755 --- a/lang/en.json +++ b/lang/en.json @@ -2111,7 +2111,7 @@ "thresholdImmunities": { "minor": { "label": "Threshold Immunities: Minor", - "hint": "Automatically ignores minor damage" + "hint": "Automatically ignores minor damage when set to 1" } } }, diff --git a/module/applications/dialogs/deathMove.mjs b/module/applications/dialogs/deathMove.mjs index a9141158..69ff758e 100644 --- a/module/applications/dialogs/deathMove.mjs +++ b/module/applications/dialogs/deathMove.mjs @@ -200,7 +200,6 @@ export default class DhDeathMove extends HandlebarsApplicationMixin(ApplicationV description: game.i18n.localize(this.selectedMove.description), result: result, open: autoExpandDescription ? 'open' : '', - chevron: autoExpandDescription ? 'fa-chevron-up' : 'fa-chevron-down', showRiskItAllButton: this.showRiskItAllButton, riskItAllButtonLabel: this.riskItAllButtonLabel, riskItAllHope: this.riskItAllHope diff --git a/module/applications/dialogs/downtime.mjs b/module/applications/dialogs/downtime.mjs index 9a9a9ddb..4c01c2a9 100644 --- a/module/applications/dialogs/downtime.mjs +++ b/module/applications/dialogs/downtime.mjs @@ -196,6 +196,9 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV .filter(x => x.testUserPermission(game.user, 'LIMITED')) .filter(x => x.uuid !== this.actor.uuid); + const autoExpandDescription = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance) + .expandRollMessage?.desc; + const cls = getDocumentClass('ChatMessage'); const msg = { user: game.user.id, @@ -216,7 +219,8 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV actor: { name: this.actor.name, img: this.actor.img }, moves: moves, characters: characters, - selfId: this.actor.uuid + selfId: this.actor.uuid, + open: autoExpandDescription ? 'open' : '' } ), flags: { diff --git a/module/applications/sheets-configs/activeEffectConfig.mjs b/module/applications/sheets-configs/activeEffectConfig.mjs index 8abc0b79..28db0efe 100644 --- a/module/applications/sheets-configs/activeEffectConfig.mjs +++ b/module/applications/sheets-configs/activeEffectConfig.mjs @@ -30,22 +30,27 @@ export default class DhActiveEffectConfig extends foundry.applications.sheets.Ac const group = game.i18n.localize(model.metadata.label); const attributes = CONFIG.Token.documentClass.getTrackedAttributes(model.metadata.type); - const getLabel = path => { - const label = model.schema.getField(path)?.label; - return label ? game.i18n.localize(label) : path; + const getTranslations = path => { + if (path === 'resources.hope.max') + return { + label: game.i18n.localize('DAGGERHEART.SETTINGS.Homebrew.FIELDS.maxHope.label'), + hint: '' + }; + + const field = model.schema.getField(path); + return { + label: field ? game.i18n.localize(field.label) : path, + hint: field ? game.i18n.localize(field.hint) : '' + }; }; const bars = attributes.bar.flatMap(x => { const joined = `${x.join('.')}.max`; - const label = - joined === 'resources.hope.max' - ? 'DAGGERHEART.SETTINGS.Homebrew.FIELDS.maxHope.label' - : getLabel(joined); - return { value: joined, label, group }; + return { value: joined, ...getTranslations(joined), group }; }); const values = attributes.value.flatMap(x => { const joined = x.join('.'); - return { value: joined, label: getLabel(joined), group }; + return { value: joined, ...getTranslations(joined), group }; }); const bonuses = getAllLeaves(model.schema.fields.bonuses, group); diff --git a/module/data/fields/actionField.mjs b/module/data/fields/actionField.mjs index 4cadeac4..89c3c287 100644 --- a/module/data/fields/actionField.mjs +++ b/module/data/fields/actionField.mjs @@ -262,6 +262,9 @@ export function ActionMixin(Base) { } async toChat(origin) { + const autoExpandDescription = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance) + .expandRollMessage?.desc; + const cls = getDocumentClass('ChatMessage'); const systemData = { title: game.i18n.localize('DAGGERHEART.CONFIG.FeatureForm.action'), @@ -290,7 +293,7 @@ export function ActionMixin(Base) { system: systemData, content: await foundry.applications.handlebars.renderTemplate( 'systems/daggerheart/templates/ui/chat/action.hbs', - systemData + { ...systemData, open: autoExpandDescription ? 'open' : '' } ), flags: { daggerheart: { diff --git a/styles/less/ui/scene-navigation/scene-navigation.less b/styles/less/ui/scene-navigation/scene-navigation.less index 6b97ddec..38768658 100644 --- a/styles/less/ui/scene-navigation/scene-navigation.less +++ b/styles/less/ui/scene-navigation/scene-navigation.less @@ -1,36 +1,39 @@ #ui-left #ui-left-column-2 { flex: 0 0 230px; - .scene-navigation { - .scene-wrapper { - display: flex; - gap: 2px; - height: var(--control-size); - width: 100%; + .scene-wrapper { + display: flex; + gap: 2px; + height: var(--control-size); + width: 100%; - .scene-environment { - padding: 0; + > ul { + margin: 0; + padding: 0; + } - img { - border-radius: 4px; - } + .scene-environment { + padding: 0; + + img { + border-radius: 4px; } } + } - .scene { - justify-content: center; - align-content: center; - background: var(--control-bg-color); - border: 1px solid var(--control-border-color); - border-radius: 4px; - color: var(--control-icon-color); - pointer-events: all; - transition: - border 0.25s, - color 0.25s; - text-shadow: none; - width: 200px; - max-width: 200px; - } + .scene { + justify-content: center; + align-content: center; + background: var(--control-bg-color); + border: 1px solid var(--control-border-color); + border-radius: 4px; + color: var(--control-icon-color); + pointer-events: all; + transition: + border 0.25s, + color 0.25s; + text-shadow: none; + width: 200px; + max-width: 200px; } } diff --git a/system.json b/system.json index b753b540..96636bab 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "1.7.0", + "version": "1.7.1", "compatibility": { "minimum": "13.346", "verified": "13.351", diff --git a/templates/ui/chat/action.hbs b/templates/ui/chat/action.hbs index 65bb0762..2854795c 100644 --- a/templates/ui/chat/action.hbs +++ b/templates/ui/chat/action.hbs @@ -1,5 +1,5 @@