[Fix] RollMessage Order (#1626)

* Fixed so that the description message always comes first with the action workflow

* Changed to instead render the description in the roll message

* Made the action config title not get changed in d20rolldialog if it's not a trait roll

* Initial chat message description design change

* Revert "Initial chat message description design change"

This reverts commit f4f5fd6c24.

* .
This commit is contained in:
WBHarry 2026-02-04 07:11:18 +01:00 committed by GitHub
parent c8d1ea1460
commit 735ed4c214
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 201 additions and 127 deletions

View file

@ -229,7 +229,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
if (Hooks.call(`${CONFIG.DH.id}.postUseAction`, this, config) === false) return;
if (this.chatDisplay) await this.toChat();
if (this.chatDisplay && !config.actionChatMessageHandled) await this.toChat();
return config;
}
@ -240,9 +240,13 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
* @returns {object}
*/
prepareBaseConfig(event) {
const isActor = this.item instanceof CONFIG.Actor.documentClass;
const actionTitle = game.i18n.localize(this.name);
const itemTitle = isActor || this.item.name === actionTitle ? '' : `${this.item.name} - `;
const config = {
event,
title: `${this.item instanceof CONFIG.Actor.documentClass ? '' : `${this.item.name}: `}${game.i18n.localize(this.name)}`,
title: `${itemTitle}${actionTitle}`,
source: {
item: this.item._id,
originItem: this.originItem,