Post to chat pour les acteurs
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { SYSTEM_SOCKET_ID } from "../constants.js";
|
||||
import { Monnaie } from "../item-monnaie.js";
|
||||
import { Misc } from "../misc.js";
|
||||
import { RdDUtility } from "../rdd-utility.js";
|
||||
import { SystemCompendiums } from "../settings/system-compendiums.js";
|
||||
|
||||
export class RdDBaseActor extends Actor {
|
||||
@ -146,4 +147,21 @@ export class RdDBaseActor extends Actor {
|
||||
canReceive(item) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async postActorToChat(modeOverride) {
|
||||
let chatData = {
|
||||
doctype: 'Actor',
|
||||
id: this.id,
|
||||
type: this.type,
|
||||
img: this.img,
|
||||
pack: this.pack,
|
||||
name: this.name,
|
||||
system: { description: this.system.description }
|
||||
}
|
||||
renderTemplate('systems/foundryvtt-reve-de-dragon/templates/post-actor.html', chatData)
|
||||
.then(html => ChatMessage.create(RdDUtility.chatDataSetup(html, modeOverride)));
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user