Using sheet prepare on text template if available

This commit is contained in:
Vlyan
2021-10-03 20:04:28 +02:00
parent b5a21f950e
commit 2ca33fa104
5 changed files with 19 additions and 9 deletions

View File

@@ -217,7 +217,8 @@ export class ActorL5r5e extends Actor {
* @return {Promise<string|null>}
*/
async renderTextTemplate() {
const tpl = await renderTemplate(`${CONFIG.l5r5e.paths.templates}actors/actor-text.html`, this);
const data = (await this.sheet?.getData()) || this;
const tpl = await renderTemplate(`${CONFIG.l5r5e.paths.templates}actors/actor-text.html`, data);
if (!tpl) {
return null;
}