Finalize aappv2 data models migration
This commit is contained in:
@@ -80,20 +80,14 @@ export class MaleficesItemSheet extends foundry.appv1.sheets.ItemSheet {
|
||||
if (this.actor) {
|
||||
chatData.actor = { id: this.actor.id };
|
||||
}
|
||||
// Don't post any image for the item (which would leave a large gap) if the default image is used
|
||||
if (chatData.img.includes("/blank.png")) {
|
||||
if (chatData.img?.includes("/blank.png")) {
|
||||
chatData.img = null;
|
||||
}
|
||||
// JSON object for easy creation
|
||||
chatData.jsondata = JSON.stringify(
|
||||
{
|
||||
compendium: "postedItem",
|
||||
payload: chatData,
|
||||
});
|
||||
chatData.config = game.system.malefices.config
|
||||
chatData.jsondata = JSON.stringify({ compendium: "postedItem", payload: chatData })
|
||||
|
||||
renderTemplate('systems/Malefices/templates/post-item.html', chatData).then(html => {
|
||||
let chatOptions = MaleficesUtility.chatDataSetup(html);
|
||||
ChatMessage.create(chatOptions)
|
||||
foundry.applications.handlebars.renderTemplate('systems/fvtt-malefices/templates/post-item.hbs', chatData).then(html => {
|
||||
ChatMessage.create(MaleficesUtility.chatDataSetup(html))
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user