forked from public/foundryvtt-reve-de-dragon
Montrer son équipement
On peut aussi le montrer sans le vendre
This commit is contained in:
@ -34,18 +34,16 @@ export class RdDItemSheet extends ItemSheet {
|
||||
// We previously restricted this to GM and editable items only. If you ever find this comment because it broke something: eh, sorry!
|
||||
if ("cout" in Misc.templateData(this.object) && this.object.isVideOuNonConteneur()) {
|
||||
buttons.unshift({
|
||||
class: "post",
|
||||
class: "vendre",
|
||||
icon: "fas fa-comments-dollar",
|
||||
onclick: ev => this.item.proposerVente()
|
||||
});
|
||||
}
|
||||
else {
|
||||
buttons.unshift({
|
||||
class: "post",
|
||||
icon: "fas fa-comment",
|
||||
onclick: ev => this.item.postItem()
|
||||
});
|
||||
}
|
||||
buttons.unshift({
|
||||
class: "montrer",
|
||||
icon: "fas fa-comment",
|
||||
onclick: ev => this.item.postItem()
|
||||
});
|
||||
return buttons
|
||||
}
|
||||
|
||||
@ -202,6 +200,10 @@ export class RdDItemSheet extends ItemSheet {
|
||||
const item = RdDSheetUtility.getItem(event, this.actor);
|
||||
item?.proposerVente();
|
||||
});
|
||||
html.find('.item-montrer').click(async event => {
|
||||
const item = RdDSheetUtility.getItem(event, this.actor);
|
||||
item?.postItem();
|
||||
});
|
||||
html.find('.item-action').click(async event => {
|
||||
const item = RdDSheetUtility.getItem(event, this.actor);
|
||||
this.actor.actionItem(item, async () => itemSheetDialog.render(true));
|
||||
|
Reference in New Issue
Block a user