From f1d08819519d4b56296c7393adf6b2bfc1c8d815 Mon Sep 17 00:00:00 2001 From: Dapoolp Date: Fri, 25 Jul 2025 16:11:42 +0200 Subject: [PATCH] fixes --- lang/en.json | 21 +++++--- .../sheets-configs/action-config.mjs | 2 +- module/config/actionConfig.mjs | 45 ++++++++++------- module/data/fields/actionField.mjs | 1 + styles/less/dialog/actions/action-list.less | 50 ++++++++++++------- styles/less/global/inventory-item.less | 2 +- templates/actionTypes/actionType.hbs | 2 +- templates/actionTypes/effect.hbs | 21 +++++++- templates/dialogs/actionSelect.hbs | 2 +- 9 files changed, 98 insertions(+), 48 deletions(-) diff --git a/lang/en.json b/lang/en.json index bf2f0fc3..29a444f7 100755 --- a/lang/en.json +++ b/lang/en.json @@ -49,25 +49,32 @@ }, "TYPES": { "attack": { - "name": "Attack" + "name": "Attack", + "tooltip": "Offensive Action like weapon attack, spellcast, etc." }, "beastform": { - "name": "Beastform" + "name": "Beastform", + "tooltip": "Shapeshift the user into another form." }, "damage": { - "name": "Damage" + "name": "Damage", + "tooltip": "Direct damage without a roll." }, "effect": { - "name": "Effect" + "name": "Generic", + "tooltip": "Generic action that only display a chat message if nothing is configured." }, "healing": { - "name": "Healing" + "name": "Healing", + "tooltip": "Restore resources to the target. May have a roll configured." }, "macro": { - "name": "Macro" + "name": "Macro", + "tooltip": "Execute a macro by UUID." }, "summon": { - "name": "Summon" + "name": "Summon", + "tooltip": "Create tokens in the scene." } } }, diff --git a/module/applications/sheets-configs/action-config.mjs b/module/applications/sheets-configs/action-config.mjs index f6b9932f..92aa9dcd 100644 --- a/module/applications/sheets-configs/action-config.mjs +++ b/module/applications/sheets-configs/action-config.mjs @@ -236,7 +236,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) { if (!this.action.effects) return; const index = button.dataset.index, effectId = this.action.effects[index]._id; - this.constructor.removeElement.bind(this)(event); + this.constructor.removeElement.bind(this)(event, button); this.action.item.deleteEmbeddedDocuments('ActiveEffect', [effectId]); } diff --git a/module/config/actionConfig.mjs b/module/config/actionConfig.mjs index 5600ae72..f6fa41f6 100644 --- a/module/config/actionConfig.mjs +++ b/module/config/actionConfig.mjs @@ -2,37 +2,44 @@ export const actionTypes = { attack: { id: 'attack', name: 'DAGGERHEART.ACTIONS.TYPES.attack.name', - icon: 'fa-swords' + icon: 'fa-khanda', + tooltip: 'DAGGERHEART.ACTIONS.TYPES.attack.tooltip' }, healing: { id: 'healing', name: 'DAGGERHEART.ACTIONS.TYPES.healing.name', - icon: 'fa-kit-medical' + icon: 'fa-kit-medical', + tooltip: 'DAGGERHEART.ACTIONS.TYPES.healing.tooltip' }, damage: { id: 'damage', name: 'DAGGERHEART.ACTIONS.TYPES.damage.name', - icon: 'fa-bone-break' - }, - summon: { - id: 'summon', - name: 'DAGGERHEART.ACTIONS.TYPES.summon.name', - icon: 'fa-ghost' - }, - effect: { - id: 'effect', - name: 'DAGGERHEART.ACTIONS.TYPES.effect.name', - icon: 'fa-person-rays' - }, - macro: { - id: 'macro', - name: 'DAGGERHEART.ACTIONS.TYPES.macro.name', - icon: 'fa-scroll' + icon: 'fa-heart-crack', + tooltip: 'DAGGERHEART.ACTIONS.TYPES.damage.tooltip' }, beastform: { id: 'beastform', name: 'DAGGERHEART.ACTIONS.TYPES.beastform.name', - icon: 'fa-paw' + icon: 'fa-paw', + tooltip: 'DAGGERHEART.ACTIONS.TYPES.beastform.tooltip' + }, + summon: { + id: 'summon', + name: 'DAGGERHEART.ACTIONS.TYPES.summon.name', + icon: 'fa-ghost', + tooltip: 'DAGGERHEART.ACTIONS.TYPES.summon.tooltip' + }, + effect: { + id: 'effect', + name: 'DAGGERHEART.ACTIONS.TYPES.effect.name', + icon: 'fa-person-rays', + tooltip: 'DAGGERHEART.ACTIONS.TYPES.effect.tooltip' + }, + macro: { + id: 'macro', + name: 'DAGGERHEART.ACTIONS.TYPES.macro.name', + icon: 'fa-scroll', + tooltip: 'DAGGERHEART.ACTIONS.TYPES.macro.tooltip' } }; diff --git a/module/data/fields/actionField.mjs b/module/data/fields/actionField.mjs index a4b97c6a..74379ac1 100644 --- a/module/data/fields/actionField.mjs +++ b/module/data/fields/actionField.mjs @@ -168,6 +168,7 @@ export function ActionMixin(Base) { ({ type } = (await foundry.applications.api.DialogV2.input({ window: { title: 'Select Action Type' }, + position: { width: 300 }, classes: ['daggerheart', 'dh-style'], content: await foundry.applications.handlebars.renderTemplate( 'systems/daggerheart/templates/actionTypes/actionType.hbs', diff --git a/styles/less/dialog/actions/action-list.less b/styles/less/dialog/actions/action-list.less index 3af09c98..f51e9a60 100644 --- a/styles/less/dialog/actions/action-list.less +++ b/styles/less/dialog/actions/action-list.less @@ -1,15 +1,46 @@ @import '../../utils/fonts.less'; .application.daggerheart.dh-style { - .actions-list { + + .actions-list, .action-buttons-list { display: flex; flex-direction: column; - gap: 10px; .action-item { display: flex; align-items: center; gap: 5px; + } + } + + .action-buttons-list { + gap: 10px; + button { + flex: 1; + display: flex; + padding: 6px 40px 6px 6px; + height: fit-content; + img { + width: 30px; + } + span { + font-family: @font-body; + flex: 1; + font-weight: bold; + } + } + } + + .actions-list { + gap: 5px; + + .action-item { + &:hover { + background-color: rgba(255,255,255,.05); + } + padding: 5px; + border-radius: 5px; + transition: background-color .3s ease-in-out; .label { display: flex; @@ -27,21 +58,6 @@ input[type="radio"] { margin-left: auto; } - - button { - flex: 1; - display: flex; - padding: 6px 40px 6px 6px; - height: fit-content; - img { - width: 30px; - } - span { - font-family: @font-body; - flex: 1; - font-weight: bold; - } - } } } } diff --git a/styles/less/global/inventory-item.less b/styles/less/global/inventory-item.less index 077ae165..452d997b 100644 --- a/styles/less/global/inventory-item.less +++ b/styles/less/global/inventory-item.less @@ -23,7 +23,7 @@ width: 100%; list-style-type: none; - &:hover { + &:not(.single-img):hover { .inventory-item-header .img-portait { .roll-img { opacity: 1; diff --git a/templates/actionTypes/actionType.hbs b/templates/actionTypes/actionType.hbs index 261fcbee..5dbe63c0 100644 --- a/templates/actionTypes/actionType.hbs +++ b/templates/actionTypes/actionType.hbs @@ -5,7 +5,7 @@