Compare commits

...

7 commits

Author SHA1 Message Date
WBHarry
ac998adaa6 Merged with development 2026-02-04 00:25:58 +01:00
WBHarry
c8d1ea1460
[Fix] TriggerConfig Expand/Collapse (#1630)
* Fixed so that the angle icon indicating expand/collapse for a trigger config actually flips when clicked

* Fixed styles
2026-02-03 23:31:18 +01:00
WBHarry
c1924534da Fixed a case where SceneConfig could fail to save because flags were not submitted 2026-02-03 23:26:29 +01:00
WBHarry
31c70469ef
[Fix] ActionField UUID for Actor Actions (#1622)
* Fixed so that actionFields correctly grab a uuid for actions that are directly on an actor

* Corrected to logical or

* Update module/data/fields/actionField.mjs

Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>

---------

Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>
2026-02-02 00:57:17 +01:00
WBHarry
491d921a9b
Made sure item.toChat enriches descriptions (#1625) 2026-02-02 00:40:09 +01:00
WBHarry
668dbdf8f4
Fixed character hopeResource to be set as 'isReversed' again, so damage and healing is applied correctly (#1620) 2026-02-01 01:19:31 +01:00
WBHarry
ab538df3aa
[Fix] 1601 - Template Enrichment (#1609)
* Fixed so param.range is compared as lowerCase

* .
2026-02-01 00:59:50 +01:00
7 changed files with 14 additions and 5 deletions

View file

@ -111,6 +111,7 @@ export default class DhSceneConfigSettings extends foundry.applications.sheets.S
/** @override */
async _processSubmitData(event, form, submitData, options) {
if (!submitData.flags) submitData.flags = {};
submitData.flags.daggerheart = this.daggerheartFlag.toObject();
submitData.flags.daggerheart.sceneEnvironments = submitData.flags.daggerheart.sceneEnvironments.filter(x =>
foundry.utils.fromUuidSync(x)

View file

@ -314,7 +314,7 @@ export default class DHActionBaseConfig extends DaggerheartSheet(ApplicationV2)
const index = Number.parseInt(button.dataset.index);
const toggle = (element, codeMirror) => {
codeMirror.classList.toggle('revealed');
const button = element.querySelector('a > i');
const button = element.querySelector('.expand-trigger > i');
button.classList.toggle('fa-angle-up');
button.classList.toggle('fa-angle-down');
};

View file

@ -41,7 +41,8 @@ export default class DhCharacter extends BaseDataActor {
min: 0,
integer: true,
label: 'DAGGERHEART.GENERAL.hope'
})
}),
isReversed: new fields.BooleanField({ initial: false })
})
}),
traits: new fields.SchemaField({

View file

@ -159,8 +159,9 @@ export function ActionMixin(Base) {
}
get uuid() {
if (!(this.item instanceof game.system.api.documents.DHItem)) return null;
return `${this.item.uuid}.${this.documentName}.${this.id}`;
const isItem = this.item instanceof game.system.api.documents.DHItem;
const isActor = this.item instanceof game.system.api.documents.DhpActor;
return isItem || isActor ? `${this.item.uuid}.${this.documentName}.${this.id}` : null;
}
get sheet() {

View file

@ -185,7 +185,10 @@ export default class DHItem extends foundry.documents.Item {
tags: this._getTags()
},
actions: item.system.actionsList,
description: this.system.description
description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.system.description, {
relativeTo: this.parent,
rollData: this.parent?.getRollData() ?? {}
})
};
const msg = {

View file

@ -4,6 +4,7 @@ export default function DhTemplateEnricher(match, _options) {
const params = parseInlineParams(match[1]);
const { type, angle = CONFIG.MeasuredTemplate.defaults.angle, inline = false } = params;
const direction = Number(params.direction) || 0;
params.range = params.range?.toLowerCase();
const range =
params.range && Number.isNaN(Number(params.range))
? Object.values(CONFIG.DH.GENERAL.templateRanges).find(

View file

@ -58,6 +58,7 @@
flex: 1;
display: flex;
flex-direction: column;
gap: 8px;
select {
flex: 1;
@ -96,6 +97,7 @@
height: 0;
min-height: 0;
transition: height 0.1s ease-in-out;
overflow: hidden;
&.revealed {
height: 300px;