From 689e287ac7b562bfadac98664fbfe4c39264c48a Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sat, 5 Oct 2024 12:50:29 +0200 Subject: [PATCH] =?UTF-8?q?Bouton=20d'export=20si=20mode=20avanc=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{actor-export-sheet.js => actor-encart-sheet.js} | 4 +++- module/rdd-main.js | 3 +-- module/settings/options-avancees.js | 2 +- .../{actor-export-sheet.hbs => actor-encart-sheet.hbs} | 2 ++ 4 files changed, 7 insertions(+), 4 deletions(-) rename module/actor/export-scriptarium/{actor-export-sheet.js => actor-encart-sheet.js} (93%) rename templates/actor/export-scriptarium/{actor-export-sheet.hbs => actor-encart-sheet.hbs} (99%) diff --git a/module/actor/export-scriptarium/actor-export-sheet.js b/module/actor/export-scriptarium/actor-encart-sheet.js similarity index 93% rename from module/actor/export-scriptarium/actor-export-sheet.js rename to module/actor/export-scriptarium/actor-encart-sheet.js index dd2cd2e5..9fbbc6d1 100644 --- a/module/actor/export-scriptarium/actor-export-sheet.js +++ b/module/actor/export-scriptarium/actor-encart-sheet.js @@ -1,6 +1,7 @@ import { RdDActorSheet } from "../../actor-sheet.js" import { SYSTEM_RDD } from "../../constants.js"; import { Misc } from "../../misc.js"; +import { EXPORT_CSV_SCRIPTARIUM, OptionsAvancees } from "../../settings/options-avancees.js"; import { ExportScriptarium } from "./export-scriptarium.js"; import { CATEGORIES_COMPETENCES, CATEGORIES_DRACONIC, Mapping } from "./mapping.js"; @@ -19,7 +20,7 @@ export class RdDActorExportSheet extends RdDActorSheet { } static get defaultOptions() { return foundry.utils.mergeObject(RdDActorSheet.defaultOptions, { - template: "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/actor-export-sheet.hbs", + template: "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/actor-encart-sheet.hbs", width: 550, showCompNiveauBase: false, vueArchetype: false, @@ -36,6 +37,7 @@ export class RdDActorExportSheet extends RdDActorSheet { formData.export = this.getMappingValues(); formData.competences = this.getCompetences(CATEGORIES_COMPETENCES) formData.draconic = this.getCompetences(CATEGORIES_DRACONIC) + formData.options.exportScriptarium = OptionsAvancees.isUsing(EXPORT_CSV_SCRIPTARIUM) return formData } diff --git a/module/rdd-main.js b/module/rdd-main.js index 4e955e53..7dca3faa 100644 --- a/module/rdd-main.js +++ b/module/rdd-main.js @@ -64,11 +64,10 @@ import { RdDItemArmure } from "./item/armure.js" import { AutoAdjustDarkness as AutoAdjustDarkness } from "./time/auto-adjust-darkness.js" import { RdDCreature } from "./actor/creature.js" import { RdDTMRDialog } from "./rdd-tmr-dialog.js" -//import { RdDActorExportSheet } from "./actor/actor-export-sheet.js" import { OptionsAvancees } from "./settings/options-avancees.js" import { ExportScriptarium } from "./actor/export-scriptarium/export-scriptarium.js" import { AppPersonnageAleatoire } from "./actor/random/app-personnage-aleatoire.js" -import { RdDActorExportSheet } from "./actor/export-scriptarium/actor-export-sheet.js" +import { RdDActorExportSheet } from "./actor/export-scriptarium/actor-encart-sheet.js" /** * RdD system diff --git a/module/settings/options-avancees.js b/module/settings/options-avancees.js index 1e4cad4e..a524bb01 100644 --- a/module/settings/options-avancees.js +++ b/module/settings/options-avancees.js @@ -4,7 +4,7 @@ import { Misc } from "../misc.js" export const EXPORT_CSV_SCRIPTARIUM = 'export-csv-scriptarium' const OPTIONS_AVANCEES = [ - { group: 'Menus', name: EXPORT_CSV_SCRIPTARIUM, descr: "Proposer le menu d'export csv Scriptarium (raffraichissement requis)" }, + { group: 'Menus', name: EXPORT_CSV_SCRIPTARIUM, descr: "Proposer le menu d'export csv Scriptarium" }, ] export class OptionsAvancees extends FormApplication { diff --git a/templates/actor/export-scriptarium/actor-export-sheet.hbs b/templates/actor/export-scriptarium/actor-encart-sheet.hbs similarity index 99% rename from templates/actor/export-scriptarium/actor-export-sheet.hbs rename to templates/actor/export-scriptarium/actor-encart-sheet.hbs index 0646dc69..8aa849d7 100644 --- a/templates/actor/export-scriptarium/actor-export-sheet.hbs +++ b/templates/actor/export-scriptarium/actor-encart-sheet.hbs @@ -2,7 +2,9 @@

{{name}}

+ {{#if options.exportScriptarium}} Export + {{/if}}