From 820cc10de29b704f1d587b5ccb9f0fa6025ddb74 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Thu, 1 Sep 2022 08:18:00 +0200 Subject: [PATCH] Sync with v10 --- babele-register.js | 3 ++- module.json | 36 +++++++++++++++++++----------------- modules/import-stat-2.js | 5 +++-- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/babele-register.js b/babele-register.js index 5ed8710..94690d9 100644 --- a/babele-register.js +++ b/babele-register.js @@ -492,6 +492,7 @@ function registerUsageCount( registerKey ) { name: "Unique world key", scope: "world", config: false, + default: "", type: String }); @@ -501,7 +502,7 @@ function registerUsageCount( registerKey ) { game.settings.set(registerKey, "world-key", worldKey ) } // Simple API counter - let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.data.version}"` + let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.version}"` $.ajax(regURL) /* -------------------------------------------- */ } diff --git a/module.json b/module.json index e03c91e..6a9a5fb 100644 --- a/module.json +++ b/module.json @@ -1,13 +1,15 @@ { - "name": "WH4-fr-translation", + "id": "WH4-fr-translation", "title": "WFRP4e - Core Module en français.", "description": "Traduction Française pour Warhammer v4.", "authors": [ {"name":"LeRatierBretonnien" }], "url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr", "flags": {}, - "version": "5.4.1", - "minimumCoreVersion": "0.8.0", - "compatibleCoreVersion": "9", + "version": "6.1.0", + "compatibility": { + "minimum": "10", + "verified": "9.283" + }, "scripts": [], "esmodules": [ "babele-register.js", @@ -123,22 +125,22 @@ "private": false } ], - "system": [ - "wfrp4e" - ], - "dependencies": [ - { - "name": "wfrp4e", - "type": "system" - }, - { - "name": "babele", + "relationships": { + "systems": [{ + "id": "wfrp4e", + "type": "system", + "compatibility": { + "verified": "6.1.1" + } + }], + "requires": [{ + "id": "babele", "type": "module" - } - ], + }] + }, "socket": false, "manifest": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/raw/v4/module.json", - "download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-5.4.1.zip", + "download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-6.1.0.zip", "protected": false, "coreTranslation": false, "library": false diff --git a/modules/import-stat-2.js b/modules/import-stat-2.js index 2747570..a7e1ceb 100644 --- a/modules/import-stat-2.js +++ b/modules/import-stat-2.js @@ -44,7 +44,8 @@ Talents: Briber, Criminal, Dealmaker, Etiquette (Criminals, Doktor, Guilder) Trappings: Dagger, Hand Weapon (Sword) ` -import ItemWfrp4e from "/systems/wfrp4e/modules/item/item-wfrp4e.js" +//import ItemWfrp4e from "/systems/wfrp4e/modules/item/item-wfrp4e.js" +//import ItemWfrp4e from "/systems/wfrp4e/wfrp4e.js" /************************************************************************************/ import "./xregexp-all.js"; @@ -321,7 +322,7 @@ export default async function statParserFR(statString, type = "npc") { } catch { } if (!itemFound && name) { - itemFound = new 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", data: game.system.model.Item.trapping }) itemFound.data.data.trappingType.value = "misc" } if (itemFound)