mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +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": {
|
"TYPES": {
|
||||||
"attack": {
|
"attack": {
|
||||||
"name": "Attack"
|
"name": "Attack",
|
||||||
|
"tooltip": "Offensive Action like weapon attack, spellcast, etc."
|
||||||
},
|
},
|
||||||
"beastform": {
|
"beastform": {
|
||||||
"name": "Beastform"
|
"name": "Beastform",
|
||||||
|
"tooltip": "Shapeshift the user into another form."
|
||||||
},
|
},
|
||||||
"damage": {
|
"damage": {
|
||||||
"name": "Damage"
|
"name": "Damage",
|
||||||
|
"tooltip": "Direct damage without a roll."
|
||||||
},
|
},
|
||||||
"effect": {
|
"effect": {
|
||||||
"name": "Effect"
|
"name": "Generic",
|
||||||
|
"tooltip": "Generic action that only display a chat message if nothing is configured."
|
||||||
},
|
},
|
||||||
"healing": {
|
"healing": {
|
||||||
"name": "Healing"
|
"name": "Healing",
|
||||||
|
"tooltip": "Restore resources to the target. May have a roll configured."
|
||||||
},
|
},
|
||||||
"macro": {
|
"macro": {
|
||||||
"name": "Macro"
|
"name": "Macro",
|
||||||
|
"tooltip": "Execute a macro by UUID."
|
||||||
},
|
},
|
||||||
"summon": {
|
"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;
|
if (!this.action.effects) return;
|
||||||
const index = button.dataset.index,
|
const index = button.dataset.index,
|
||||||
effectId = this.action.effects[index]._id;
|
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]);
|
this.action.item.deleteEmbeddedDocuments('ActiveEffect', [effectId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,37 +2,44 @@ export const actionTypes = {
|
||||||
attack: {
|
attack: {
|
||||||
id: 'attack',
|
id: 'attack',
|
||||||
name: 'DAGGERHEART.ACTIONS.TYPES.attack.name',
|
name: 'DAGGERHEART.ACTIONS.TYPES.attack.name',
|
||||||
icon: 'fa-swords'
|
icon: 'fa-khanda',
|
||||||
|
tooltip: 'DAGGERHEART.ACTIONS.TYPES.attack.tooltip'
|
||||||
},
|
},
|
||||||
healing: {
|
healing: {
|
||||||
id: 'healing',
|
id: 'healing',
|
||||||
name: 'DAGGERHEART.ACTIONS.TYPES.healing.name',
|
name: 'DAGGERHEART.ACTIONS.TYPES.healing.name',
|
||||||
icon: 'fa-kit-medical'
|
icon: 'fa-kit-medical',
|
||||||
|
tooltip: 'DAGGERHEART.ACTIONS.TYPES.healing.tooltip'
|
||||||
},
|
},
|
||||||
damage: {
|
damage: {
|
||||||
id: 'damage',
|
id: 'damage',
|
||||||
name: 'DAGGERHEART.ACTIONS.TYPES.damage.name',
|
name: 'DAGGERHEART.ACTIONS.TYPES.damage.name',
|
||||||
icon: 'fa-bone-break'
|
icon: 'fa-heart-crack',
|
||||||
},
|
tooltip: 'DAGGERHEART.ACTIONS.TYPES.damage.tooltip'
|
||||||
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'
|
|
||||||
},
|
},
|
||||||
beastform: {
|
beastform: {
|
||||||
id: 'beastform',
|
id: 'beastform',
|
||||||
name: 'DAGGERHEART.ACTIONS.TYPES.beastform.name',
|
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 } =
|
({ type } =
|
||||||
(await foundry.applications.api.DialogV2.input({
|
(await foundry.applications.api.DialogV2.input({
|
||||||
window: { title: 'Select Action Type' },
|
window: { title: 'Select Action Type' },
|
||||||
|
position: { width: 300 },
|
||||||
classes: ['daggerheart', 'dh-style'],
|
classes: ['daggerheart', 'dh-style'],
|
||||||
content: await foundry.applications.handlebars.renderTemplate(
|
content: await foundry.applications.handlebars.renderTemplate(
|
||||||
'systems/daggerheart/templates/actionTypes/actionType.hbs',
|
'systems/daggerheart/templates/actionTypes/actionType.hbs',
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,46 @@
|
||||||
@import '../../utils/fonts.less';
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
.application.daggerheart.dh-style {
|
.application.daggerheart.dh-style {
|
||||||
.actions-list {
|
|
||||||
|
.actions-list, .action-buttons-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
|
||||||
|
|
||||||
.action-item {
|
.action-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 5px;
|
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 {
|
.label {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -27,21 +58,6 @@
|
||||||
input[type="radio"] {
|
input[type="radio"] {
|
||||||
margin-left: auto;
|
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%;
|
width: 100%;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
|
||||||
&:hover {
|
&:not(.single-img):hover {
|
||||||
.inventory-item-header .img-portait {
|
.inventory-item-header .img-portait {
|
||||||
.roll-img {
|
.roll-img {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<ul class="actions-list">
|
<ul class="actions-list">
|
||||||
{{#each types}}
|
{{#each types}}
|
||||||
<li class="action-item">
|
<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>
|
<i class="fa-solid {{icon}} fa-xl"></i>
|
||||||
<span class="label">{{localize name}}</span>
|
<span class="label">{{localize name}}</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<a><i class="fa-solid fa-plus icon-button" data-action="addEffect"></i></a>
|
<a><i class="fa-solid fa-plus icon-button" data-action="addEffect"></i></a>
|
||||||
</legend>
|
</legend>
|
||||||
<ul class="items-list">
|
<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">
|
<div class="inventory-item" data-effect-id="{{effect._id}}" data-action="editEffect">
|
||||||
{{#with (@root.getEffectDetails effect._id) as | details |}}
|
{{#with (@root.getEffectDetails effect._id) as | details |}}
|
||||||
<img class="item-img" src="{{img}}">
|
<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>
|
<a data-tooltip="{{localize "CONTROLS.CommonDelete"}}" data-action="removeEffect" data-index="{{index}}"><i class="fas fa-trash"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</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}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<header class="dialog-header">
|
<header class="dialog-header">
|
||||||
<h1>{{itemName}}</h1>
|
<h1>{{itemName}}</h1>
|
||||||
</header>
|
</header>
|
||||||
<ul class="actions-list">
|
<ul class="action-buttons-list">
|
||||||
{{#each actions}}
|
{{#each actions}}
|
||||||
<li class="action-item">
|
<li class="action-item">
|
||||||
<button type="button" class="list-button" data-action-id="{{id}}" data-action="choose">
|
<button type="button" class="list-button" data-action-id="{{id}}" data-action="choose">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue