Fix for wfrp 4.0
This commit is contained in:
parent
716a27f6ad
commit
3fbd6d733f
@ -407,26 +407,19 @@ Hooks.once('init', () => {
|
|||||||
},
|
},
|
||||||
"trapping_qualities_flaws": (value) => {
|
"trapping_qualities_flaws": (value) => {
|
||||||
if ( value ) {
|
if ( value ) {
|
||||||
//console.log("ATOUTS", value);
|
let newQF = [];
|
||||||
var list = value.split( "," );
|
console.log("ATOUTS", value);
|
||||||
var i=0;
|
var i=0;
|
||||||
var re = /(.*) (\d+)/i;
|
//var re = /(.*) (\d+)/i;
|
||||||
for (i=0; i<list.length; i++) {
|
for (i=0; i<value.length; i++) {
|
||||||
let trim = list[i].trim();
|
newQF[i] = duplicate(value[i]);
|
||||||
if ( trim == "Trap Blade") {
|
if ( newQF[i].name == "Trap Blade") {
|
||||||
trim = "TrapBlade"; // Auto-patch, without space!
|
newQF[i].name = "TrapBlade"; // Auto-patch, without space!
|
||||||
//console.log("PATCHED", trim);
|
//console.log("PATCHED", trim);
|
||||||
}
|
}
|
||||||
var splitted = re.exec( trim );
|
newQF[i].name = game.i18n.localize( newQF[i].name ) ;
|
||||||
//console.log("Current quality", splitted, trim );
|
|
||||||
if ( splitted ) {
|
|
||||||
//console.log("FOund:", splitted[0], splitted[1], splitted[2] );
|
|
||||||
list[i] = game.i18n.localize( splitted[1] ) + " " + splitted[2];
|
|
||||||
} else {
|
|
||||||
list[i] = game.i18n.localize( trim ) ;
|
|
||||||
}
|
}
|
||||||
}
|
return newQF;
|
||||||
return list.toString();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Search back in careers the translated name of the groupe (as it is the name of the level career itself)
|
// Search back in careers the translated name of the groupe (as it is the name of the level career itself)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "WH4-fr-translation",
|
"name": "WH4-fr-translation",
|
||||||
"title": "WFRP4e - Core Module en français.",
|
"title": "WFRP4e - Core Module en français.",
|
||||||
"description": "Traduction Française pour Warhammer v4.",
|
"description": "Traduction Française pour Warhammer v4.",
|
||||||
"version": "4.0.0",
|
"version": "4.0.1",
|
||||||
"minimumCoreVersion" : "0.8.0",
|
"minimumCoreVersion" : "0.8.0",
|
||||||
"compatibleCoreVersion": "0.8.8",
|
"compatibleCoreVersion": "0.8.8",
|
||||||
"author": "LeRatierBretonnien",
|
"author": "LeRatierBretonnien",
|
||||||
|
Loading…
Reference in New Issue
Block a user