Rework cuisine

This commit is contained in:
Vincent Vandemeulebrouck 2021-04-21 22:02:17 +02:00
parent 70b3feede8
commit b663560b53
2 changed files with 47 additions and 53 deletions

View File

@ -2335,10 +2335,14 @@ export class RdDActor extends Actor {
console.log("rollArt !!!", artData); console.log("rollArt !!!", artData);
const dialog = await RdDRoll.create(this, artData, { html: `systems/foundryvtt-reve-de-dragon/templates/dialog-roll-${artData.art}.html` }, { 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}`, name: `jet-${artData.art}`,
label: `${artData.verbe} ${oeuvre.name}`, label: `${artData.verbe} ${oeuvre.name}`,
height: 600,
callbacks: [ callbacks: [
this.createCallbackExperience(), this.createCallbackExperience(),
this.createCallbackAppelAuMoral(), this.createCallbackAppelAuMoral(),
@ -2396,13 +2400,13 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollRecetteCuisine(id) { async rollRecetteCuisine(id) {
const oeuvre = Misc.data(this.getRecetteCuisine(id));
const artData = { const artData = {
art: 'cuisine', art: 'cuisine',
verbe: 'Cuisiner', verbe: 'Cuisiner',
proportions: 1, proportions: 1,
ajouterEquipement: false ajouterEquipement: false
}; };
const oeuvre = Misc.data(this.getRecetteCuisine(id));
await this._rollArt(artData, 'odoratgout', oeuvre, r => this._resultRecetteCuisine(r)); await this._rollArt(artData, 'odoratgout', oeuvre, r => this._resultRecetteCuisine(r));
} }

View File

@ -1,54 +1,44 @@
<form class="rdddialog"> <form class="rdddialog">
<h2 class="tooltip" style="width: 100%;">Cuisiner: {{oeuvre.name}}
<div class="tooltiptext ttt-titre">
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}}
</div>
</h2>
<div class="grid grid-2col"> <div class="grid grid-2col">
<div class="flex-group-left"> <div class="flex-group-left">
<ul> <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
<li><label>Cuisiner : {{oeuvre.name}}</label></li> <div>
<li><label>Jet : ODORAT-GOUT / {{competence.name}}</label></li>
<li><label>Exotisme : {{oeuvre.data.exotisme}}</label></li>
</ul>
</div>
<div class="flex-group-left">
<div class="flexrow"> <div class="flexrow">
<label class="competence-label">Multiplier les proportions</label> <label>Caractéristique: </label><label>{{selectedCarac.label}}</label>
<input class="competence-value cuisine-proportions" type="number" size="4" name="proportions" value="{{proportions}}" data-dtype="Number" />
</div> </div>
<div class="flexrow"> <div class="flexrow">
<label class="competence-label">Ajouter à l'équipement</label> <label>{{competence.name}}: </label><label>{{numberFormat competence.data.niveau decimals=0 sign=true}}</label></label>
</div>
<div class="flexrow">
<label>Exotisme: </label><label>{{oeuvre.data.exotisme}}</label>
</div>
<div class="flexrow">
<label for="proportions">Proportions: </label>
<input class="cuisine-proportions" type="number" size="4" name="proportions" value="{{proportions}}" data-dtype="Number" />
</div>
<div class="flexrow">
<label for="ajouterEquipement">Ajouter à l'équipement</label>
<input class="checkbox-by-name" type="checkbox" name="ajouterEquipement" {{#if ajouterEquipement}}checked{{/if}} /> <input class="checkbox-by-name" type="checkbox" name="ajouterEquipement" {{#if ajouterEquipement}}checked{{/if}} />
</div> </div>
</div> </div>
</div> </div>
<div class="grid grid-3col">
<div class="flex-group-left">
<label>Conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}}
{{#each ajustementsConditions as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
</div>
<div class="flex-group-left"> <div class="flex-group-left">
<div class="flexrow">
<label>Difficulté</label> <label>Difficulté</label>
<select name="diffLibre" id="diffLibre" data-dtype="number"> <label>{{numberFormat diffLibre decimals=0 sign=true}}</label>
{{#select diffLibre}}
{{#each difficultesLibres as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
</div> </div>
<div class="flex-group-right flexrow"> {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}}
<div class="tooltipAppelAuMoral divAppelAuMoral"> {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html"}}
<img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg"> <div id="tableAjustements" class="flexrow"></div>
<span class="tooltipAppelAuMoralText">Sans appel au moral</span>
</div> </div>
</div> </div>
</div>
<div id="tableAjustements">
</div>
<div id="tableResolution"></div> <div id="tableResolution"></div>
<div id="tableProbaReussite"></div> <div id="tableProbaReussite"></div>
</form> </form>