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 WFRP4E from "/systems/wfrp4e/modules/system/config-wfrp4e.js";
//import WFRP_Tables from "/systems/wfrp4e/modules/system/tables-wfrp4e.js";
//import WFRP4E from "/systems/wfrp4e/modules/system/config-wfrp4e.js";
/************************************************************************************/
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
}
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"} ,
{ 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();
game.modules.forEach((module, name) => {
if ( name == "wfrp4e-core" && module.active) {
FilePicker.browse("data", "modules/WH4-fr-translation/tables/").then(resp => {
for (var file of resp.files) {
let filename = file.substring(file.lastIndexOf("/")+1, file.indexOf(".json"));
if ( __wfrp4e_tables[filename] == 1 ) { // Matching table name -> patch !
fetch(file).then(r=>r.json()).then(records => {
console.log("Patch !!!", filename);
WFRP_Tables[filename] = records;
console.log("Patch !!!", 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";
/*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) {
if ( file.match("career.json") ) {
fetch(file).then(r=>r.json()).then(records => {
@ -294,7 +294,7 @@ const __check_fix_wrong_modules = ( chatFlag, patchFinished ) => {
});
}
}
});*/
});
game.wfrp4e.config.speciesSkills["gnome"] = [
"Focalisation (Ulgu)",
"Charme",
@ -398,10 +398,10 @@ Hooks.once('ready', () => {
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") } );
setTimeout( __check_fix_wrong_modules, 2000, true, false);
setTimeout( __check_fix_wrong_modules, 10000, false, false);
setTimeout( __check_fix_wrong_modules, 20000, false, true);
setTimeout( __add_actors_translation, 21000, false, true);
//setTimeout( __check_fix_wrong_modules, 2000, true, false);
//setTimeout( __check_fix_wrong_modules, 10000, false, false);
//setTimeout( __check_fix_wrong_modules, 20000, false, true);
//setTimeout( __add_actors_translation, 21000, false, true);
let compmod = "wfrp4e";
// Check various settings in the installation
@ -410,7 +410,7 @@ Hooks.once('ready', () => {
compmod = "wfrp4e-core";
}
} );
__auto_patch_translation_journal_compendium( compmod )
//__auto_patch_translation_journal_compendium( compmod )
/* Uncomment this to auto-create the translation tables
Auto-create translation journal tables
__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";
/************************************************************************************/
@ -164,8 +166,8 @@ var compmod = "wfrp4e";
Hooks.once('init', () => {
// Replace to manage specific bonuses/char. computations
CONFIG.Actor.entityClass = ActorWfrp4e_fr;
//CONFIG.Actor.entityClass = ActorWfrp4e_fr;
// Check various settings in the installation
game.modules.forEach((module, name) => {
if ( name == "wfrp4e-core" && module.active) {

View File

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

File diff suppressed because one or more lines are too long