Add missing spells

This commit is contained in:
sladecraven 2020-11-06 00:10:51 +01:00
parent 7f9a018826
commit 8019b25bda
4 changed files with 32 additions and 18 deletions

View File

@ -1,6 +1,6 @@
/************************************************************************************/ /************************************************************************************/
import WFRP_Tables from "/systems/wfrp4e/modules/system/tables-wfrp4e.js"; //import WFRP_Tables from "/systems/wfrp4e/modules/system/tables-wfrp4e.js";
import WFRP4E from "/systems/wfrp4e/modules/system/config-wfrp4e.js"; //import WFRP4E from "/systems/wfrp4e/modules/system/config-wfrp4e.js";
/************************************************************************************/ /************************************************************************************/
const _patch_eis = () => { const _patch_eis = () => {
@ -216,7 +216,7 @@ let __eis_tables = { "animalmishap":1, "beasthead":1, "coincedentalenc":1, "demo
"harmfulenc":1, "positiveenc":1, "weather":1, "mutatephys": 1 "harmfulenc":1, "positiveenc":1, "weather":1, "mutatephys": 1
} }
let __wfrp4e_tables = { "career": 1, "critbody":1, "critleg": 1, "doom": 1, "eyes": 1, "majormis": 1, "mutatemental": 1, "oops": 1, "species":1, "travel": 1, let __wfrp4e_tables = { "career": 1, "critbody":1, "critleg": 1, "doom": 1, "eyes": 1, "majormis": 1, "mutatemental": 1, "oops": 1, "species":1, "travel": 1,
"critarm": 1, "crithead": 1, "delirium": 1, "event": 1, "hair": 1, "minormis": 1, "mutatephys": 1, "talents": 1, "wrath": 1 "hitloc": 1, "critarm": 1, "crithead": 1, "delirium": 1, "event": 1, "hair": 1, "minormis": 1, "mutatephys": 1, "talents": 1, "wrath": 1
} }
let __to_table_translate = [ { name:"traits", transl:"Traits"}, {name:"talents", transl:"Talents"}, {name:"skills", transl:"Compétences"} , let __to_table_translate = [ { name:"traits", transl:"Traits"}, {name:"talents", transl:"Talents"}, {name:"skills", transl:"Compétences"} ,
{ name:"careers", transl:"Carrières"}, {name:"spells", transl:"Sorts"}, {name:"prayers", transl:"Bénédictions et Miracles" } , { name:"careers", transl:"Carrières"}, {name:"spells", transl:"Sorts"}, {name:"prayers", transl:"Bénédictions et Miracles" } ,
@ -265,25 +265,25 @@ const __check_fix_wrong_modules = ( chatFlag, patchFinished ) => {
_fix_post_module_loading(); _fix_post_module_loading();
game.modules.forEach((module, name) => { game.modules.forEach((module, name) => {
if ( name == "wfrp4e-core" && module.active) { if ( name == "wfrp4e-core" && module.active) {
FilePicker.browse("data", "modules/WH4-fr-translation/tables/").then(resp => { FilePicker.browse("data", "modules/WH4-fr-translation/tables/").then(resp => {
for (var file of resp.files) { for (var file of resp.files) {
let filename = file.substring(file.lastIndexOf("/")+1, file.indexOf(".json")); let filename = file.substring(file.lastIndexOf("/")+1, file.indexOf(".json"));
if ( __wfrp4e_tables[filename] == 1 ) { // Matching table name -> patch ! if ( __wfrp4e_tables[filename] == 1 ) { // Matching table name -> patch !
fetch(file).then(r=>r.json()).then(records => { fetch(file).then(r=>r.json()).then(records => {
console.log("Patch !!!", filename); console.log("Patch !!!", filename, records);
WFRP_Tables[filename] = records; //WFRP_Tables[filename] = records;
//game.wfrp4e.tables[filename] = records;
}); });
} }
} }
}); });
} }
if ( name == "wfrp4e-rnhd" && module.active ) { if ( name == "wfrp4e-rnhd2" && module.active ) {
game.wfrp4e.tables.career.name = "Carrières aléatoires"; game.wfrp4e.tables.career.name = "Carrières aléatoires";
/*FilePicker.browse("data", "modules/WH4-fr-translation/tables/").then(resp => { FilePicker.browse("data", "modules/WH4-fr-translation/tables/").then(resp => {
for (var file of resp.files) { for (var file of resp.files) {
if ( file.match("career.json") ) { if ( file.match("career.json") ) {
fetch(file).then(r=>r.json()).then(records => { fetch(file).then(r=>r.json()).then(records => {
@ -294,7 +294,7 @@ const __check_fix_wrong_modules = ( chatFlag, patchFinished ) => {
}); });
} }
} }
});*/ });
game.wfrp4e.config.speciesSkills["gnome"] = [ game.wfrp4e.config.speciesSkills["gnome"] = [
"Focalisation (Ulgu)", "Focalisation (Ulgu)",
"Charme", "Charme",
@ -398,10 +398,10 @@ Hooks.once('ready', () => {
if (game.user.isGM) if (game.user.isGM)
ChatMessage.create( { title: "Patch en progression", content: "Les modules WFRP4E sont <strong>en cours de patch pour traduction</strong>... Merci <strong>d'attendre le message de fin</strong> (dans environ 20 secondes)", whisper: ChatMessage.getWhisperRecipients("GM") } ); ChatMessage.create( { title: "Patch en progression", content: "Les modules WFRP4E sont <strong>en cours de patch pour traduction</strong>... Merci <strong>d'attendre le message de fin</strong> (dans environ 20 secondes)", whisper: ChatMessage.getWhisperRecipients("GM") } );
setTimeout( __check_fix_wrong_modules, 2000, true, false); //setTimeout( __check_fix_wrong_modules, 2000, true, false);
setTimeout( __check_fix_wrong_modules, 10000, false, false); //setTimeout( __check_fix_wrong_modules, 10000, false, false);
setTimeout( __check_fix_wrong_modules, 20000, false, true); //setTimeout( __check_fix_wrong_modules, 20000, false, true);
setTimeout( __add_actors_translation, 21000, false, true); //setTimeout( __add_actors_translation, 21000, false, true);
let compmod = "wfrp4e"; let compmod = "wfrp4e";
// Check various settings in the installation // Check various settings in the installation
@ -410,7 +410,7 @@ Hooks.once('ready', () => {
compmod = "wfrp4e-core"; compmod = "wfrp4e-core";
} }
} ); } );
__auto_patch_translation_journal_compendium( compmod ) //__auto_patch_translation_journal_compendium( compmod )
/* Uncomment this to auto-create the translation tables /* Uncomment this to auto-create the translation tables
Auto-create translation journal tables Auto-create translation journal tables
__create_translation_tables(compmod); __create_translation_tables(compmod);

View File

@ -1,4 +1,6 @@
/************************************************************************************/ /************************************************************************************/
import WFRP_Tables from "/systems/wfrp4e/modules/system/tables-wfrp4e.js";
import WFRP4E from "/systems/wfrp4e/modules/system/config-wfrp4e.js";
import ActorWfrp4e from "/systems/wfrp4e//modules/actor/actor-wfrp4e.js"; import ActorWfrp4e from "/systems/wfrp4e//modules/actor/actor-wfrp4e.js";
/************************************************************************************/ /************************************************************************************/
@ -164,7 +166,7 @@ var compmod = "wfrp4e";
Hooks.once('init', () => { Hooks.once('init', () => {
// Replace to manage specific bonuses/char. computations // Replace to manage specific bonuses/char. computations
CONFIG.Actor.entityClass = ActorWfrp4e_fr; //CONFIG.Actor.entityClass = ActorWfrp4e_fr;
// Check various settings in the installation // Check various settings in the installation
game.modules.forEach((module, name) => { game.modules.forEach((module, name) => {

View File

@ -3,7 +3,7 @@
"name": "WH4-fr-translation", "name": "WH4-fr-translation",
"title": "Traduction du module WH4 en Français.", "title": "Traduction du module WH4 en Français.",
"description": "La traduction du module WH4.", "description": "La traduction du module WH4.",
"version": "1.3.5", "version": "1.3.6",
"minimumCoreVersion" : "0.6.6", "minimumCoreVersion" : "0.6.6",
"compatibleCoreVersion": "1.0.0", "compatibleCoreVersion": "1.0.0",
"author": "LeRatierBretonnien", "author": "LeRatierBretonnien",

File diff suppressed because one or more lines are too long