Skip to content

Commit

Permalink
Auto import monsters from compendiums
Browse files Browse the repository at this point in the history
  • Loading branch information
cswendrowski committed Jul 26, 2021
1 parent d70874a commit ff52523
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Hooks.once('ready', function() {

if (game.system.id == "archmage") {
window.dungeonMoon = {
pathfinder2E: new Pathfinder2E()
thirteenthAge: new ThirteenthAge()
};
console.log("13th Age Init");
}
Expand Down
3 changes: 3 additions & 0 deletions vue/EncounterBuilder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ export default {
let baseY = viewedScene.data.height * viewedScene.data.padding;
for (let x = 0; x < this.selectedActors.length; x++) {
let actor = this.selectedActors[x];
if (actor.source && !game.actors.get(actor.id)) {
actor = await Actor.create(actor.data);
}
let token = duplicate(actor.data.token);
token.x = baseX + x * viewedScene.data.grid;
token.y = baseY;
Expand Down

0 comments on commit ff52523

Please sign in to comment.