Add missing spells

This commit is contained in:
2020-11-06 09:17:37 +01:00
parent 9244bd6d2a
commit f916d4df40
9 changed files with 185 additions and 177 deletions

View File

@ -243,7 +243,7 @@ const __create_translation_tables = async (compmod) => {
/************************************************************************************
* The default static compendium of translation tables must be aut-mapped to the relevant
* compendium content name (ie either wfrp4e or wfrp4e-content up to now).
* compendium content name (ie either wfrp4e or wfrp4e-core up to now).
* */
const __auto_patch_translation_journal_compendium = async (compmod) => {
if (game.user.isGM) {
@ -252,7 +252,7 @@ const __auto_patch_translation_journal_compendium = async (compmod) => {
let translEntries = await compData.getContent();
for (let entryData of translEntries ) {
let mydata = duplicate(entryData.data);
mydata.content = mydata.content.replace(/__TO_REPLACE__/g, compmod );
mydata.content = mydata.content.replace(/wfrp4e-content/g, compmod );
entryData.update( mydata );
}
compData.locked = true;
@ -271,7 +271,7 @@ const __check_fix_wrong_modules = ( chatFlag, patchFinished ) => {
let filename = file.substring(file.lastIndexOf("/")+1, file.indexOf(".json"));
if ( __wfrp4e_tables[filename] == 1 ) { // Matching table name -> patch !
fetch(file).then(r=>r.json()).then(records => {
console.log("Patch !!!", filename, records);
//console.log("Patch !!!", filename, records);
//WFRP_Tables[filename] = records;
game.wfrp4e.tables[filename] = records;
});
@ -410,7 +410,7 @@ Hooks.once('ready', () => {
compmod = "wfrp4e-core";
}
} );
//__auto_patch_translation_journal_compendium( compmod )
__auto_patch_translation_journal_compendium( compmod )
/* Uncomment this to auto-create the translation tables
Auto-create translation journal tables
__create_translation_tables(compmod);