Add unofficial grimoire support

This commit is contained in:
2020-10-06 07:46:21 +02:00
parent 2d6d9f34ed
commit 31d53a9655
7 changed files with 373 additions and 33 deletions

View File

@ -266,6 +266,7 @@ Hooks.once('init', () => {
var fullprayers = game.packs.get(compmod+'.prayers');
var eisitems = game.packs.get('eis.eisitems');
var eisspells = game.packs.get('eis.eisspells');
var ugspells = game.packs.get('wfrp4e-unofficial-grimoire.spells-ug');
console.log("Comp :", compmod, fulltraits);
for (let trait_en of beast_traits)
@ -328,6 +329,9 @@ Hooks.once('init', () => {
if ( (!trait_fr.data || !trait_fr.data.description || !trait_fr.data.description.value) && eisspells) { // If no translation, test eisspells
trait_fr = eisspells.translate( { name: name_en } );
}
if ( (!trait_fr.data || !trait_fr.data.description || !trait_fr.data.description.value) && ugspells) { // If no translation, test eisspells
trait_fr = ugspells.translate( { name: name_en } );
}
//console.log(">>>>> Spell ?", name_en, special, trait_fr.name );
trait_en.name = trait_fr.name + special;
if ( trait_fr.data && trait_fr.data.description && trait_fr.data.description.value )