From b663560b533a22006bc71bf7cc8137f43b055a78 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Wed, 21 Apr 2021 22:02:17 +0200 Subject: [PATCH] Rework cuisine --- module/actor.js | 26 ++++---- templates/dialog-roll-recettecuisine.html | 74 ++++++++++------------- 2 files changed, 47 insertions(+), 53 deletions(-) diff --git a/module/actor.js b/module/actor.js index e1715786..677fea6f 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2335,16 +2335,20 @@ export class RdDActor extends Actor { console.log("rollArt !!!", artData); - const dialog = await RdDRoll.create(this, artData, { html: `systems/foundryvtt-reve-de-dragon/templates/dialog-roll-${artData.art}.html` }, { - name: `jet-${artData.art}`, - label: `${artData.verbe} ${oeuvre.name}`, - height: 600, - callbacks: [ - this.createCallbackExperience(), - this.createCallbackAppelAuMoral(), - { action: r => callBackResult(r) } - ] - }); + const dialog = await RdDRoll.create(this, artData, + { + html: `systems/foundryvtt-reve-de-dragon/templates/dialog-roll-${oeuvre.type}.html`, + options: { height: 500, } + }, + { + name: `jet-${artData.art}`, + label: `${artData.verbe} ${oeuvre.name}`, + callbacks: [ + this.createCallbackExperience(), + this.createCallbackAppelAuMoral(), + { action: r => callBackResult(r) } + ] + }); dialog.render(true); } @@ -2396,13 +2400,13 @@ export class RdDActor extends Actor { /* -------------------------------------------- */ async rollRecetteCuisine(id) { + const oeuvre = Misc.data(this.getRecetteCuisine(id)); const artData = { art: 'cuisine', verbe: 'Cuisiner', proportions: 1, ajouterEquipement: false }; - const oeuvre = Misc.data(this.getRecetteCuisine(id)); await this._rollArt(artData, 'odoratgout', oeuvre, r => this._resultRecetteCuisine(r)); } diff --git a/templates/dialog-roll-recettecuisine.html b/templates/dialog-roll-recettecuisine.html index 8ad1d093..a8316dbb 100644 --- a/templates/dialog-roll-recettecuisine.html +++ b/templates/dialog-roll-recettecuisine.html @@ -1,54 +1,44 @@
+

Cuisiner: {{oeuvre.name}} +
+ {{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}} +
+

+
-
    -
  • -
  • -
  • -
+ {{competence.name}} +
+
+ +
+
+ +
+
+ +
+
+ + +
+
+ + +
+
- - - -
-
- - + +
+ {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}} + {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html"}} +
-
-
- - -
-
- - -
-
-
- - Sans appel au moral -
-
-
-
-
+