Fix actor import
This commit is contained in:
parent
6918eaeb1b
commit
43d78c5c68
@ -289,6 +289,7 @@ Hooks.once('init', () => {
|
|||||||
console.log("No beast traits found here ...")
|
console.log("No beast traits found here ...")
|
||||||
return beast_traits
|
return beast_traits
|
||||||
}
|
}
|
||||||
|
//console.log("TRANS:", beast_traits)
|
||||||
for (let trait_en of beast_traits) {
|
for (let trait_en of beast_traits) {
|
||||||
let special = "";
|
let special = "";
|
||||||
let nbt = "";
|
let nbt = "";
|
||||||
@ -403,7 +404,7 @@ Hooks.once('init', () => {
|
|||||||
}
|
}
|
||||||
if (trait_fr.name && (trait_fr.name == "Sprinter" || trait_fr.name != name_en)) { // Talent translated!
|
if (trait_fr.name && (trait_fr.name == "Sprinter" || trait_fr.name != name_en)) { // Talent translated!
|
||||||
trait_en.name = trait_fr.name.trim() + special
|
trait_en.name = trait_fr.name.trim() + special
|
||||||
if (trait_fr.system) { // Why ???
|
if (trait_fr.system?.description?.value) { // Why ???
|
||||||
trait_en.system.description.value = trait_fr.system.description.value;
|
trait_en.system.description.value = trait_fr.system.description.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -412,21 +413,23 @@ Hooks.once('init', () => {
|
|||||||
if (game.system.version.match("7.")) {
|
if (game.system.version.match("7.")) {
|
||||||
compendiumCareers = 'wfrp4e-core.items'
|
compendiumCareers = 'wfrp4e-core.items'
|
||||||
}
|
}
|
||||||
let career_fr = game.babele.translate(compendiumCareers, trait_en, true);
|
let career_fr = game.babele.translate(compendiumCareers, { name: name_en }, true);
|
||||||
career_fr.name = career_fr.name || trait_en.name
|
trait_en.name = career_fr.name || trait_en.name
|
||||||
//console.log(">>>>> Career ?", career_fr.name );
|
//console.log(">>>>> Career ?", career_fr.name );
|
||||||
|
if ( career_fr?.system) {
|
||||||
trait_en.system = duplicate(career_fr.system);
|
trait_en.system = duplicate(career_fr.system);
|
||||||
|
}
|
||||||
|
|
||||||
} else if (trait_en.type == "trapping" || trait_en.type == "weapon" || trait_en.type == "armour" || trait_en.type == "container" || trait_en.type == "money") {
|
} else if (trait_en.type == "trapping" || trait_en.type == "weapon" || trait_en.type == "armour" || trait_en.type == "container" || trait_en.type == "money") {
|
||||||
let compendiumTrappings = 'wfrp4e-core.trappings' // Per default
|
let compendiumTrappings = 'wfrp4e-core.trappings' // Per default
|
||||||
if (game.system.version.match("7.")) {
|
if (game.system.version.match("7.")) {
|
||||||
compendiumTrappings = 'wfrp4e-core.items'
|
compendiumTrappings = 'wfrp4e-core.items'
|
||||||
}
|
}
|
||||||
let trapping_fr = game.babele.translate(compendiumTrappings, trait_en, true);
|
let trapping_fr = game.babele.translate(compendiumTrappings, { name: name_en }, true);
|
||||||
//console.log(">>>>> Trapping ?", name_en, trapping_fr.name);
|
//console.log(">>>>> Trapping ?", name_en, trapping_fr.name);
|
||||||
trapping_fr.name = trapping_fr.name || trait_en.name
|
trait_en.name = trapping_fr.name || trait_en.name
|
||||||
if (trapping_fr.system) {
|
if (trapping_fr.system?.description?.value) {
|
||||||
trait_en.system.description = trapping_fr.system.description;
|
trait_en.system.description.value = trapping_fr.system.description.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user