Montrer son équipement

On peut aussi le montrer sans le vendre
This commit is contained in:
Vincent Vandemeulebrouck
2021-12-10 01:21:01 +01:00
parent 508d352b0b
commit 4aef9c0571
5 changed files with 16 additions and 94 deletions

View File

@ -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));