Translate actor vehicle roles

This commit is contained in:
Pallando 2024-10-06 18:30:10 +02:00
parent 3c7366ce04
commit 37f3eb3997

View File

@ -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) {