Fix sur carrieres + nouvelles traductions

This commit is contained in:
2021-06-10 21:27:40 +02:00
parent 730c522b22
commit c2268df6f6
24 changed files with 1378 additions and 549 deletions

View File

@ -77,7 +77,7 @@ let __eis_tables = { "animalmishap":1, "beasthead":1, "coincedentalenc":1, "demo
"vehiclemishap": 1,"quadruped": 1, "ridingmishap": 1, "weather": 1,
"delirium": 1
}
let __dotr_tables = { "rowingboat":1, "sailingboat":1
let __dotr_tables = { "rowingboat":1, "sailingboat":1, "wind-direction": 1, "waterborne": 1, "traderumour": 1
}
let __wfrp4e_tables = { "career": 1, "critbody":1, "critleg": 1, "doom": 1, "eyes": 1, "majormis": 1, "mutatemental": 1, "oops": 1, "species":1, "travel": 1,
"hitloc": 1, "critarm": 1, "crithead": 1, "delirium": 1, "event": 1, "hair": 1, "minormis": 1, "mutatephys": 1, "talents": 1, "wrath": 1,
@ -132,7 +132,7 @@ const patch_core_tables = (tableList) => {
let filename = file.substring(file.lastIndexOf("/")+1, file.indexOf(".json"));
if ( tableList[filename] == 1 ) { // Matching table name -> patch !
fetch(file).then(r=>r.json()).then(records => {
console.log("Patch !!!", filename, records);
//console.log("Patch !!!", filename, records);
//WFRP_Tables[filename] = records;
game.wfrp4e.tables[filename] = records;
});
@ -141,6 +141,15 @@ const patch_core_tables = (tableList) => {
});
}
/************************************************************************************/
const patch_trade_gazeteer = () => {
if ( game.wfrp4e.config.trade?.gazetteer) {
fetch( "modules/WH4-fr-translation/tables/gazetteer.json").then( r => r.json()).then(records => {
game.wfrp4e.config.trade.gazetteer = records;
}) ;
}
}
/************************************************************************************/
const __check_fix_wrong_modules = ( chatFlag, patchFinished ) => {
@ -156,6 +165,7 @@ const __check_fix_wrong_modules = ( chatFlag, patchFinished ) => {
}
if ( name == "wfrp4e-dotr" && module.active) {
patch_core_tables( __dotr_tables );
patch_trade_gazeteer()
}
if ( name == "wfrp4e-rnhd" && module.active && game.wfrp4e.tables.career) {