From c51877f9451af6274f4ed572bd2ae911ff1b81bb Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Sun, 9 Jun 2024 17:08:53 +0200 Subject: [PATCH] Fix table import --- module.json | 4 ++-- modules/babele-register.js | 2 +- scripts/TGN070HeJLl3gSMY.js | 2 +- scripts/dfnCK8jCPXNLM7Gh.js | 2 +- tools/detect_identical_files.lua | 24 ++++++++++++++++++++++++ 5 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 tools/detect_identical_files.lua diff --git a/module.json b/module.json index 0d89f1c..dea77aa 100644 --- a/module.json +++ b/module.json @@ -8,7 +8,7 @@ } ], "url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr", - "version": "7.2.1", + "version": "7.2.2", "esmodules": [ "modules/babele-register.js", "modules/addon-register.js", @@ -117,7 +117,7 @@ } ], "manifest": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/raw/v10/module.json", - "download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-7.2.1.zip", + "download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-7.2.2.zip", "id": "wh4-fr-translation", "compatibility": { "minimum": "11", diff --git a/modules/babele-register.js b/modules/babele-register.js index 4cffe8f..1c884b0 100644 --- a/modules/babele-register.js +++ b/modules/babele-register.js @@ -300,7 +300,7 @@ Hooks.once('init', () => { } } if (results[0].documentCollection) { - return game.babele.instance.converters.tableResults(results) + return game.babele.converters.tableResults(results) } return results }, diff --git a/scripts/TGN070HeJLl3gSMY.js b/scripts/TGN070HeJLl3gSMY.js index 876f760..0959de2 100644 --- a/scripts/TGN070HeJLl3gSMY.js +++ b/scripts/TGN070HeJLl3gSMY.js @@ -1,4 +1,4 @@ -let test = await this.actor.setupCharacteristic("ag", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: "Goes Prone" }}) +let test = await this.actor.setupCharacteristic("ag", {skipTargets: true, appendTitle : ` - ${this.effect.name}`, context: { failure: "A Terre" }}) await test.roll(); if (test.failed) { diff --git a/scripts/dfnCK8jCPXNLM7Gh.js b/scripts/dfnCK8jCPXNLM7Gh.js index a80cc5d..334949b 100644 --- a/scripts/dfnCK8jCPXNLM7Gh.js +++ b/scripts/dfnCK8jCPXNLM7Gh.js @@ -2,7 +2,7 @@ let aoeDamage = this.effect.sourceTest.result.damage - 5 // Easily handle magic this.script.scriptMessage(await this.actor.applyBasicDamage(aoeDamage, {damageType : game.wfrp4e.config.DAMAGE_TYPE.IGNORE_AP, suppressMsg : true})) -let test = await this.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {skipTargets: true, appendTitle : ` - Ablaze`}) +let test = await this.actor.setupSkill(game.i18n.localize("NAME.Dodge"), {skipTargets: true, appendTitle : ` - En Flammes`}) await test.roll(); diff --git a/tools/detect_identical_files.lua b/tools/detect_identical_files.lua new file mode 100644 index 0000000..3b5d3d9 --- /dev/null +++ b/tools/detect_identical_files.lua @@ -0,0 +1,24 @@ +local lfs = require"lfs" + +local src = "../reference_scripts/" +local dst = "../scripts/" + +for file in lfs.dir(src) do + if file == '.' or file == '..' then + else + local fp1 = io.open(dst..file, "r+") + local fp2 = io.open(src..file, "r+") + if fp1 and fp2 then + -- Compare files + local content1 = fp1:read("*all") + local content2 = fp2:read("*all") + if content1 == content2 then + print("Identical files: "..file) + end + fp1:close() + fp2:close() + else + print("Error: Could not open file: "..file) + end + end +end