First row of tests and fixes
This commit is contained in:
@@ -1,7 +1,25 @@
|
||||
import AwERoll from "./roll.mjs"
|
||||
|
||||
export default class AwEChatMessage extends ChatMessage {
|
||||
/** @override */
|
||||
async getHTML(...args) {
|
||||
const html = await super.getHTML(...args)
|
||||
return html
|
||||
async _renderRollContent(messageData) {
|
||||
if (this.rolls[0] instanceof AwERoll) {
|
||||
const isPrivate = !this.isContentVisible
|
||||
const roll = this.rolls[0]
|
||||
|
||||
const html = await foundry.applications.handlebars.renderTemplate(
|
||||
AwERoll.CHAT_TEMPLATE,
|
||||
{
|
||||
flavor: this.flavor,
|
||||
total: roll.total,
|
||||
outcome: isPrivate ? null : roll.outcome,
|
||||
dc: roll.dc,
|
||||
isPrivate
|
||||
}
|
||||
)
|
||||
messageData.message.content = html
|
||||
return
|
||||
}
|
||||
return super._renderRollContent(messageData)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user