Skip to content

Commit

Permalink
Merge pull request #5 from jwinget/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
jwinget authored Nov 15, 2020
2 parents e6dc31b + 994abd8 commit 8466ecd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
14 changes: 7 additions & 7 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
"description": "A module to import CritterDB bestiaries into Foundry VTT compendia",
"authors": [
{
"name": "jwinget",
"name": "Jason Winget",
"email": "[email protected]",
"url": "https://github.com/jwinget"
},
{
"name": "seriallos",
"name": "Blake Tacklind",
"email": "",
"url": "https://github.com/seriallos"
"url": "https://github.com/BlakeTacklind"
}
],
"version": "1.0.2",
"version": "1.0.4",
"minimumCoreVersion": "0.6.6",
"compatibleCoreVersion": "0.6.7",
"compatibleCoreVersion": "0.7.7",
"system": "dnd5e",
"styles": [
"styles/style.css"
Expand All @@ -25,6 +25,6 @@
"scripts/critterdb-import.js"
],
"url": "https://github.com/jwinget/fvtt-module-critterdb-import/",
"manifest": "https://github.com/jwinget/fvtt-module-critterdb-import/releases/download/1.0.2/module.json",
"download": "https://github.com/jwinget/fvtt-module-critterdb-import/releases/download/1.0.2/critterdb-import.zip"
"manifest": "https://github.com/jwinget/fvtt-module-critterdb-import/releases/download/1.0.4/module.json",
"download": "https://github.com/jwinget/fvtt-module-critterdb-import/releases/download/1.0.4/critterdb-import.zip"
}
11 changes: 9 additions & 2 deletions scripts/critterdb-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,21 @@ activateListeners(html) {
foundryAbilities[ability_map[save.ability]].proficient = 1
}

// Find image if present
if (c.flavor.imageUrl) {
var img_url = c.flavor.imageUrl;
} else {
img_url = "icons/mystery-man.png";
}

// Create the temporary actor data structure
let tempActor = {
name: c.name,
type: "npc",
img: c.flavor.imageUrl,
img: img_url,
token: {
name: c.name,
img: c.flavor.imageUrl
img: img_url
},
data: {
abilities: foundryAbilities,
Expand Down

0 comments on commit 8466ecd

Please sign in to comment.