fit-content pour toutes les fenêtres roll

C'est le comportement par défaut, donc enlever les surcharges
Corrections pour les fenêtres de combat
This commit is contained in:
Vincent Vandemeulebrouck 2022-11-23 22:41:49 +01:00
parent e78ae3b292
commit 5e7fcf3c9b
3 changed files with 67 additions and 80 deletions

View File

@ -779,10 +779,7 @@ export class RdDActor extends Actor {
rollData.competence.system.defaut_carac = 'reve-actuel';
const dialog = await RdDRoll.create(this, rollData,
{
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-reve-de-dragon.html',
options: { height: 'fit-content' }
},
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-reve-de-dragon.html' },
{
name: 'maitrise',
label: 'Maîtriser le Rêve de Dragon',
@ -2360,7 +2357,6 @@ export class RdDActor extends Actor {
const dialog = await RdDRoll.create(this, rollData,
{
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-sort.html',
options: { height: 'fit-content' },
close: html => { this.currentTMR.maximize() } // Re-display TMR
},
{
@ -2565,7 +2561,9 @@ export class RdDActor extends Actor {
RdDItemCompetenceCreature.setRollDataCreature(rollData)
}
console.log("rollCompetence !!!", rollData);
const dialog = await RdDRoll.create(this, rollData, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html' }, {
const dialog = await RdDRoll.create(this, rollData,
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html' },
{
name: 'jet-competence',
label: 'Jet ' + Grammar.apostrophe('de', rollData.competence.name),
callbacks: [
@ -2625,7 +2623,9 @@ export class RdDActor extends Actor {
console.log("rollTache !!!", rollData);
const dialog = await RdDRoll.create(this, rollData, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html' }, {
const dialog = await RdDRoll.create(this, rollData,
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html' },
{
name: 'jet-competence',
label: 'Jet de Tâche ' + tacheData.name,
callbacks: [
@ -2680,10 +2680,7 @@ 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-${oeuvre.type}.html`,
options: { height: 'fit-content', }
},
{ html: `systems/foundryvtt-reve-de-dragon/templates/dialog-roll-${oeuvre.type}.html` },
{
name: `jet-${artData.art}`,
label: `${artData.verbe} ${oeuvre.name}`,
@ -2820,10 +2817,7 @@ export class RdDActor extends Actor {
};
const dialog = await RdDRoll.create(this, meditationData,
{
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-meditation.html',
options: { height: 'fit-content', }
},
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-meditation.html' },
{
name: 'jet-meditation',
label: "Jet de méditation",
@ -2899,7 +2893,6 @@ export class RdDActor extends Actor {
const dialog = await RdDRoll.create(this, rollData,
{
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-signedraconique.html',
options: { height: 'fit-content' },
close: html => { this.currentTMR.maximize() } // Re-display TMR
},
{
@ -3783,9 +3776,7 @@ export class RdDActor extends Actor {
rollData.competence.system.defaut_carac = caracTache;
const dialog = await RdDRoll.create(this, rollData,
{
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-alchimie.html',
},
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-alchimie.html' },
{
name: 'tache-alchimique',
label: 'Tache Alchimique',

View File

@ -791,10 +791,8 @@ export class RdDCombat {
await this.proposerAjustementTirLancer(rollData)
const dialog = await RdDRoll.create(this.attacker, rollData,
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html' },
{
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html',
options: { height: 540 }
}, {
name: 'jet-attaque',
label: 'Attaque: ' + (arme?.name ?? competence.name),
callbacks: [
@ -1050,10 +1048,8 @@ export class RdDCombat {
let rollData = this._prepareParade(attackerRoll, arme, competence);
const dialog = await RdDRoll.create(this.defender, rollData,
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html' },
{
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html',
options: { height: 540 }
}, {
name: 'jet-parade',
label: 'Parade: ' + (arme ? arme.name : rollData.competence.name),
callbacks: [
@ -1133,7 +1129,8 @@ export class RdDCombat {
let rollData = this._prepareEsquive(attackerRoll, esquive);
const dialog = await RdDRoll.create(this.defender, rollData,
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html' }, {
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html' },
{
name: 'jet-esquive',
label: 'Esquiver',
callbacks: [

View File

@ -775,7 +775,6 @@ export class RdDTMRDialog extends Dialog {
const dialog = await RdDRoll.create(this.actor, rollData,
{
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-maitrise-tmr.html',
options: { height: 'fit-content' },
close: html => { this.maximize(); } // Re-display TMR
},
{