Translate actor vehicle roles
This commit is contained in:
parent
3c7366ce04
commit
37f3eb3997
@ -515,6 +515,17 @@ Hooks.once('init', () => {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (trait_en.type == "vehicleRole") {
|
||||
let validCompendiums = game.wfrp4e.tags.getPacksWithTag("vehicleRole")
|
||||
for (let compData of validCompendiums) {
|
||||
let role_fr = game.babele.translate(compData.metadata.id, { name: name_en }, true);
|
||||
if (role_fr?.system) {
|
||||
trait_en.name = role_fr.name || trait_en.name
|
||||
// DEBG: console.log(">>>>> Role ?", role_fr.name );
|
||||
trait_en.system = foundry.utils.duplicate(role_fr.system);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (trait_en.type == "trapping" || trait_en.type == "weapon" || trait_en.type == "armour" || trait_en.type == "container" || trait_en.type == "money") {
|
||||
let validCompendiums = game.wfrp4e.tags.getPacksWithTag(["trapping"], ["weapon", "armour", "container", "money"])
|
||||
for (let compData of validCompendiums) {
|
||||
|
Loading…
Reference in New Issue
Block a user