Fix career + ajout traduction de tables
This commit is contained in:
parent
00d87b8795
commit
5f63f6fc8e
@ -73,10 +73,15 @@ const _manage_inn_roll = async (content, msg) => {
|
||||
/************************************************************************************/
|
||||
let __eis_tables = { "animalmishap":1, "beasthead":1, "coincedentalenc":1, "demonic-mien":1,
|
||||
"expandedmutatemental":1, "expandedmutatephys":1, "fixations":1,
|
||||
"harmfulenc":1, "positiveenc":1, "weather":1, "mutatephys": 1
|
||||
"harmfulenc":1, "positiveenc":1, "weather":1, "mutatephys": 1,
|
||||
"vehiclemishap": 1,"quadruped": 1, "ridingmishap": 1
|
||||
}
|
||||
let __dotr_tables = { "rowingboat":1, "sailingboat":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
|
||||
"hitloc": 1, "critarm": 1, "crithead": 1, "delirium": 1, "event": 1, "hair": 1, "minormis": 1, "mutatephys": 1, "talents": 1, "wrath": 1,
|
||||
"astral": 1, "corruption": 1, "snake": 1, "spider": 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" } ,
|
||||
@ -119,27 +124,39 @@ const __auto_patch_translation_journal_compendium = async (compmod) => {
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
const patch_core_tables = (tableList) => {
|
||||
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 ( tableList[filename] == 1 ) { // Matching table name -> patch !
|
||||
fetch(file).then(r=>r.json()).then(records => {
|
||||
console.log("Patch !!!", filename, records);
|
||||
//WFRP_Tables[filename] = records;
|
||||
game.wfrp4e.tables[filename] = records;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
const __check_fix_wrong_modules = ( chatFlag, patchFinished ) => {
|
||||
|
||||
WH4FRPatchConfig.perform_patch();
|
||||
|
||||
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, records);
|
||||
//WFRP_Tables[filename] = records;
|
||||
game.wfrp4e.tables[filename] = records;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
patch_core_tables( __wfrp4e_tables );
|
||||
}
|
||||
|
||||
if ( name == "wfrp4e-eis" && module.active) {
|
||||
patch_core_tables( __eis_tables );
|
||||
}
|
||||
if ( name == "wfrp4e-dotr" && module.active) {
|
||||
patch_core_tables( __dotr_tables );
|
||||
}
|
||||
|
||||
if ( name == "wfrp4e-rnhd" && module.active && game.wfrp4e.tables.career) {
|
||||
game.wfrp4e.tables.career.name = "Carrières aléatoires";
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "WH4-fr-translation",
|
||||
"title": "Traduction du module WH4 en Français.",
|
||||
"description": "La traduction du module WH4.",
|
||||
"version": "1.6.3",
|
||||
"version": "1.6.4",
|
||||
"minimumCoreVersion" : "0.7.1",
|
||||
"compatibleCoreVersion": "0.7.9",
|
||||
"author": "LeRatierBretonnien",
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,29 +1,29 @@
|
||||
{
|
||||
"name": "Hit Location - Quadruped",
|
||||
"name": "Localisation - Quadrupède",
|
||||
"hide" : true,
|
||||
"die": "1d100",
|
||||
"rows": [{
|
||||
"description": "Head",
|
||||
"description": "Tête",
|
||||
"result": "head",
|
||||
"range": [1, 16]
|
||||
}, {
|
||||
"description": "Body",
|
||||
"description": "Corps",
|
||||
"result": "body",
|
||||
"range": [17, 56]
|
||||
}, {
|
||||
"description": "Front Left Leg",
|
||||
"description": "Jambe gauche avant",
|
||||
"result": "lArm",
|
||||
"range": [57, 67]
|
||||
}, {
|
||||
"description": "Front Right Leg",
|
||||
"description": "Jambe droite avant",
|
||||
"result": "rArm",
|
||||
"range": [68, 78]
|
||||
}, {
|
||||
"description": "Back Left Leg",
|
||||
"description": "Jambe arrière gauche",
|
||||
"result": "lLeg",
|
||||
"range": [79, 89]
|
||||
}, {
|
||||
"description": "Back Right Leg",
|
||||
"description": "Jambe arrière droite",
|
||||
"result": "rLeg",
|
||||
"range": [90, 100]
|
||||
}]
|
||||
|
Loading…
Reference in New Issue
Block a user