From 1fdfa6a83419efb672442d49c6ad36b4fc129464 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 23 Apr 2022 00:24:52 +0200 Subject: [PATCH] =?UTF-8?q?Actions=20sur=20objets=20d'un=20v=C3=A9hicule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Permettre les mêmes actions pour les objets d'un véhicule que pour ceux d'un personnage ou créature --- module/actor-vehicule-sheet.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/module/actor-vehicule-sheet.js b/module/actor-vehicule-sheet.js index b4a33c37..1d39f106 100644 --- a/module/actor-vehicule-sheet.js +++ b/module/actor-vehicule-sheet.js @@ -112,6 +112,19 @@ export class RdDActorVehiculeSheet extends ActorSheet { const li = RdDSheetUtility.getEventElement(event); RdDUtility.confirmerSuppression(this, li); }); + html.find('.item-vendre').click(async event => { + 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); + }); html.find('.creer-un-objet').click(async event => { RdDUtility.selectObjetType(this);