diff --git a/daggerheart.mjs b/daggerheart.mjs index e418401a..49ed7049 100644 --- a/daggerheart.mjs +++ b/daggerheart.mjs @@ -243,17 +243,14 @@ 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 19317228..618beefc 100755 --- a/lang/en.json +++ b/lang/en.json @@ -2111,7 +2111,7 @@ "thresholdImmunities": { "minor": { "label": "Threshold Immunities: Minor", - "hint": "Automatically ignores minor damage when set to 1" + "hint": "Automatically ignores minor damage" } } }, diff --git a/module/applications/dialogs/deathMove.mjs b/module/applications/dialogs/deathMove.mjs index 69ff758e..a9141158 100644 --- a/module/applications/dialogs/deathMove.mjs +++ b/module/applications/dialogs/deathMove.mjs @@ -200,6 +200,7 @@ 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 4c01c2a9..9a9a9ddb 100644 --- a/module/applications/dialogs/downtime.mjs +++ b/module/applications/dialogs/downtime.mjs @@ -196,9 +196,6 @@ 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, @@ -219,8 +216,7 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV actor: { name: this.actor.name, img: this.actor.img }, moves: moves, characters: characters, - selfId: this.actor.uuid, - open: autoExpandDescription ? 'open' : '' + selfId: this.actor.uuid } ), flags: { diff --git a/module/applications/sheets-configs/activeEffectConfig.mjs b/module/applications/sheets-configs/activeEffectConfig.mjs index 28db0efe..8abc0b79 100644 --- a/module/applications/sheets-configs/activeEffectConfig.mjs +++ b/module/applications/sheets-configs/activeEffectConfig.mjs @@ -30,27 +30,22 @@ 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 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 getLabel = path => { + const label = model.schema.getField(path)?.label; + return label ? game.i18n.localize(label) : path; }; const bars = attributes.bar.flatMap(x => { const joined = `${x.join('.')}.max`; - return { value: joined, ...getTranslations(joined), group }; + const label = + joined === 'resources.hope.max' + ? 'DAGGERHEART.SETTINGS.Homebrew.FIELDS.maxHope.label' + : getLabel(joined); + return { value: joined, label, group }; }); const values = attributes.value.flatMap(x => { const joined = x.join('.'); - return { value: joined, ...getTranslations(joined), group }; + return { value: joined, label: getLabel(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 89c3c287..4cadeac4 100644 --- a/module/data/fields/actionField.mjs +++ b/module/data/fields/actionField.mjs @@ -262,9 +262,6 @@ 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'), @@ -293,7 +290,7 @@ export function ActionMixin(Base) { system: systemData, content: await foundry.applications.handlebars.renderTemplate( 'systems/daggerheart/templates/ui/chat/action.hbs', - { ...systemData, open: autoExpandDescription ? 'open' : '' } + systemData ), flags: { daggerheart: { diff --git a/styles/less/ui/scene-navigation/scene-navigation.less b/styles/less/ui/scene-navigation/scene-navigation.less index 38768658..6b97ddec 100644 --- a/styles/less/ui/scene-navigation/scene-navigation.less +++ b/styles/less/ui/scene-navigation/scene-navigation.less @@ -1,39 +1,36 @@ #ui-left #ui-left-column-2 { flex: 0 0 230px; - .scene-wrapper { - display: flex; - gap: 2px; - height: var(--control-size); - width: 100%; + .scene-navigation { + .scene-wrapper { + display: flex; + gap: 2px; + height: var(--control-size); + width: 100%; - > ul { - margin: 0; - padding: 0; - } + .scene-environment { + padding: 0; - .scene-environment { - padding: 0; - - img { - border-radius: 4px; + 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 96636bab..b753b540 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.1", + "version": "1.7.0", "compatibility": { "minimum": "13.346", "verified": "13.351", diff --git a/templates/ui/chat/action.hbs b/templates/ui/chat/action.hbs index 2854795c..65bb0762 100644 --- a/templates/ui/chat/action.hbs +++ b/templates/ui/chat/action.hbs @@ -1,5 +1,5 @@