88 Gestion argent/commerce

This commit is contained in:
2021-01-01 21:11:56 +01:00
parent 3c2241197a
commit dc57058465
13 changed files with 459 additions and 30 deletions

View File

@ -1,5 +1,6 @@
import { RdDItemSort } from "./item-sort.js";
import { RdDUtility } from "./rdd-utility.js";
import { RdDItem } from "./item-rdd.js";
/**
* Extend the basic ItemSheet with some very simple modifications
@ -19,7 +20,20 @@ export class RdDItemSheet extends ItemSheet {
}
/* -------------------------------------------- */
_getHeaderButtons() {
let buttons = super._getHeaderButtons();
// Add "Post to chat" button
// We previously restricted this to GM and editable items only. If you ever find this comment because it broke something: eh, sorry!
buttons.unshift(
{
class: "post",
icon: "fas fa-comment",
onclick: ev => new RdDItem(this.item.data).postItem()
})
return buttons
}
/* -------------------------------------------- */
/** @override */
setPosition(options={}) {
const position = super.setPosition(options);