diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 5276e1a..c90e9b6 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -19,9 +19,10 @@
-
+
-
+
+
@@ -116,7 +117,11 @@
-
+
+
+
+
+
1604937546780
@@ -293,7 +298,14 @@
1611390671092
-
+
+ 1611391307811
+
+
+
+ 1611391307811
+
+
@@ -338,6 +350,7 @@
-
+
+
\ No newline at end of file
diff --git a/module.json b/module.json
index 11db5f7..bdcd0eb 100644
--- a/module.json
+++ b/module.json
@@ -2,9 +2,9 @@
"name": "EEEG-Importer",
"title": "EEEG-Importer",
"description": "A module that allows you to import your cities generated with Eigengrau's Generator into a collection of journal entries.",
- "version": "1.0.1",
+ "version": "1.1.0",
"minimumCoreVersion": "0.7.6",
- "compatibleCoreVersion": "0.7.8",
+ "compatibleCoreVersion": "0.8.0",
"author": "HadaIonut",
"dependencies": [
diff --git a/scripts/lib/ImportWindow.js b/scripts/lib/ImportWindow.js
index ba08521..0fc7154 100644
--- a/scripts/lib/ImportWindow.js
+++ b/scripts/lib/ImportWindow.js
@@ -5,6 +5,11 @@ const prepareDisplayName = (folder) => {
return prepareDisplayName(game.folders.get(folder.data.parent)) + '/' + folder.data.name;
}
+const isFoundry8 = () => {
+ const foundryVersion = game.data.version;
+ return foundryVersion >= '0.8.0' && foundryVersion < '0.9.0';
+}
+
export default class ImportWindow extends Application {
static get defaultOptions() {
@@ -26,7 +31,7 @@ export default class ImportWindow extends Application {
const locationSelector = html.find("#customLocation");
const locationSelectorActors = html.find('#customLocationActor');
- const folders = game.folders.entries;
+ const folders = isFoundry8() ? game.folders : game.folders.entries;
folders.forEach((folder) => {
if (folder.data.type === 'JournalEntry')
diff --git a/scripts/module.js b/scripts/module.js
index 73d3e51..b527057 100644
--- a/scripts/module.js
+++ b/scripts/module.js
@@ -11,3 +11,4 @@ Hooks.on("renderSidebarTab", async (app, html) => {
html.find(".header-actions").after(buttonDiv);
}
})
+