[Feature] Roll Difficulty Support (#393)

* Added difficulty support in rollDialog/rollMessage and [[/dr]]

* Fixed /dr chat command
This commit is contained in:
WBHarry 2025-07-22 01:51:49 +02:00 committed by GitHub
parent 42a705a870
commit 3d723e7d8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 89 additions and 54 deletions

View file

@ -1,10 +1,10 @@
export default class DhpChatMessage extends foundry.documents.ChatMessage {
async renderHTML() {
if (this.system.messageTemplate)
this.content = await foundry.applications.handlebars.renderTemplate(
this.system.messageTemplate,
this.system
);
this.content = await foundry.applications.handlebars.renderTemplate(this.system.messageTemplate, {
...this.system,
_source: this.system._source
});
/* We can change to fully implementing the renderHTML function if needed, instead of augmenting it. */
const html = await super.renderHTML();