Convert items from Sea of Claws and translate skills for vehicle roles #104

Merged
uberwald merged 7 commits from :soc into v10 2024-10-11 20:09:51 +02:00
Showing only changes of commit 37f3eb3997 - Show all commits

View File

@ -515,6 +515,17 @@ Hooks.once('init', () => {
break; 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") { } 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"]) let validCompendiums = game.wfrp4e.tags.getPacksWithTag(["trapping"], ["weapon", "armour", "container", "money"])
for (let compData of validCompendiums) { for (let compData of validCompendiums) {