mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
fixes
This commit is contained in:
parent
549140d861
commit
f1d0881951
9 changed files with 98 additions and 48 deletions
21
lang/en.json
21
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."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
width: 100%;
|
||||
list-style-type: none;
|
||||
|
||||
&:hover {
|
||||
&:not(.single-img):hover {
|
||||
.inventory-item-header .img-portait {
|
||||
.roll-img {
|
||||
opacity: 1;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<ul class="actions-list">
|
||||
{{#each types}}
|
||||
<li class="action-item">
|
||||
<label class="label" for="{{id}}">
|
||||
<label class="label" for="{{id}}" data-tooltip="{{localize tooltip}}" data-tooltip-direction="LEFT">
|
||||
<i class="fa-solid {{icon}} fa-xl"></i>
|
||||
<span class="label">{{localize name}}</span>
|
||||
</label>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<a><i class="fa-solid fa-plus icon-button" data-action="addEffect"></i></a>
|
||||
</legend>
|
||||
<ul class="items-list">
|
||||
{{#each source as | effect index |}}
|
||||
{{!-- {{#each source as | effect index |}}
|
||||
<div class="inventory-item" data-effect-id="{{effect._id}}" data-action="editEffect">
|
||||
{{#with (@root.getEffectDetails effect._id) as | details |}}
|
||||
<img class="item-img" src="{{img}}">
|
||||
|
|
@ -18,6 +18,25 @@
|
|||
<a data-tooltip="{{localize "CONTROLS.CommonDelete"}}" data-action="removeEffect" data-index="{{index}}"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}} --}}
|
||||
{{#each source as | effect index |}}
|
||||
<div class="inventory-item single-img" data-effect-id="{{effect._id}}" data-action="editEffect">
|
||||
<div class="inventory-item-header">
|
||||
{{#with (@root.getEffectDetails effect._id) as | details |}}
|
||||
<div class="img-portait">
|
||||
<img class="item-img" src="{{img}}">
|
||||
</div>
|
||||
<div class="item-label">
|
||||
<div class="item-name">{{name}}</div>
|
||||
</div>
|
||||
{{/with}}
|
||||
<input type="hidden" name="effects.{{index}}._id" value="{{effect._id}}">
|
||||
{{#if @root.source.save.trait}}{{formInput ../fields.onSave value=effect.onSave name=(concat "effects." index ".onSave") dataset=(object tooltip=(localize "DAGGERHEART.UI.Tooltip.appliedEvenIfSuccessful") tooltipDirection="UP")}}{{/if}}
|
||||
<div class="controls">
|
||||
<a data-tooltip="{{localize "CONTROLS.CommonDelete"}}" data-action="removeEffect" data-index="{{index}}"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<header class="dialog-header">
|
||||
<h1>{{itemName}}</h1>
|
||||
</header>
|
||||
<ul class="actions-list">
|
||||
<ul class="action-buttons-list">
|
||||
{{#each actions}}
|
||||
<li class="action-item">
|
||||
<button type="button" class="list-button" data-action-id="{{id}}" data-action="choose">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue