From 0f09baa7fe0d0c6ffe0c9619e3cf843f1fef620d Mon Sep 17 00:00:00 2001 From: sladecraven Date: Mon, 17 Oct 2022 18:04:07 +0200 Subject: [PATCH] Fix actor auto-patch for babele --- addon-register.js | 5 ++--- module.json | 4 ++-- modules/import-stat-2.js | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/addon-register.js b/addon-register.js index 60226bd..0ee1f24 100644 --- a/addon-register.js +++ b/addon-register.js @@ -296,9 +296,8 @@ const __add_actors_translation = () => { "entries": [ ] } - game.babele.packs.set(metadata, new TranslatedCompendium(metadata, translations)); - //newpack = new TranslatedCompendium(pack, translations); - //console.log("Actor compendium has been replaced !!!!", pack.metadata.name); + //console.log(metadata, translations) + game.babele.packs.set(metadata.metadata.id, new TranslatedCompendium(metadata.metadata, translations)) } } } diff --git a/module.json b/module.json index 4e66124..4bf1b4e 100644 --- a/module.json +++ b/module.json @@ -8,7 +8,7 @@ } ], "url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr", - "version": "6.2.9", + "version": "6.2.10", "esmodules": [ "babele-register.js", "addon-register.js", @@ -136,7 +136,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-6.2.9.zip", + "download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-6.2.10.zip", "id": "wh4-fr-translation", "compatibility": { "minimum": "10", diff --git a/modules/import-stat-2.js b/modules/import-stat-2.js index 18aa7b7..9f51378 100644 --- a/modules/import-stat-2.js +++ b/modules/import-stat-2.js @@ -322,7 +322,7 @@ export default async function statParserFR(statString, type = "npc") { } catch { } if (!itemFound && name) { - itemFound = new game.entities.ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: name, type: "trapping", data: game.system.model.Item.trapping }) + itemFound = new game.entities.ItemWfrp4e({ img: "systems/wfrp4e/icons/blank.png", name: name, type: "trapping", system: game.system.model.Item.trapping }) itemFound.system.trappingType.value = "misc" } if (itemFound)