Update CSS/Look & feel
This commit is contained in:
@@ -13,7 +13,7 @@ export default class MournbladeCYD2ItemSheetV2 extends HandlebarsApplicationMixi
|
||||
|
||||
/** @override */
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ["fvtt-mournblade-cyd2", "item"],
|
||||
classes: ["fvtt-mournblade-cyd-2-0", "item"],
|
||||
position: {
|
||||
width: 620,
|
||||
height: 600,
|
||||
@@ -107,7 +107,24 @@ export default class MournbladeCYD2ItemSheetV2 extends HandlebarsApplicationMixi
|
||||
}
|
||||
|
||||
static async #onPostItem(event) {
|
||||
await this.document.toChat?.();
|
||||
event.preventDefault();
|
||||
const item = this.document;
|
||||
const chatData = foundry.utils.duplicate(item);
|
||||
if (item.actor) {
|
||||
chatData.actor = { id: item.actor.id };
|
||||
}
|
||||
if (chatData.img?.includes("/blank.png")) {
|
||||
chatData.img = null;
|
||||
}
|
||||
chatData.jsondata = JSON.stringify({
|
||||
compendium: "postedItem",
|
||||
payload: chatData,
|
||||
});
|
||||
const html = await foundry.applications.handlebars.renderTemplate(
|
||||
"systems/fvtt-mournblade-cyd-2-0/templates/post-item.hbs",
|
||||
chatData
|
||||
);
|
||||
ChatMessage.create({ user: game.user.id, content: html });
|
||||
}
|
||||
|
||||
static async #onAddPredilection(event) {
|
||||
|
||||
Reference in New Issue
Block a user