Skip to content

Commit

Permalink
Updated test file, and fixed link to gods in NPS as actors
Browse files Browse the repository at this point in the history
  • Loading branch information
HadaIonut committed Oct 21, 2021
1 parent 9a4ef46 commit 0071291
Show file tree
Hide file tree
Showing 3 changed files with 403 additions and 222 deletions.
8 changes: 6 additions & 2 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions scripts/lib/CityImporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const secondPassActors = async (ids) => {
if (!actor) continue;
const actorClone = JSON.parse(JSON.stringify(actor));
let replaceText = actorClone.data.details.biography.value;
replaceText = replaceText.replace(/@JournalEntry\[tip-([\w-]+)\]{(.*?)}/g, (_0, original, name) => {
replaceText = replaceText.replace(/@JournalEntry\[([\w]+)\]{(.*?)}/g, (_0, original, name) => {
for (const value of allJournals.values())
if (value.data.name.toLowerCase() === name.toLowerCase())
return `@JournalEntry[${value.data._id}]{${name}}`
Expand Down Expand Up @@ -180,4 +180,4 @@ const createCity = async (rawText, NPCsAsActors, hasCustomNPCLocation, location)
ui.notifications.info("Your city has been imported successfully");
}

export {createCity}
export {createCity}
Loading

0 comments on commit 0071291

Please sign in to comment.