diff --git a/module/module.json b/module/module.json index 8467607..8af4a44 100644 --- a/module/module.json +++ b/module/module.json @@ -6,9 +6,13 @@ "url": "https://github.com/mattd/foundryvtt-progress-clocks", "manifest": "https://raw.githubusercontent.com/mattd/foundryvtt-progress-clocks/main/module/module.json", "download": "https://github.com/mattd/foundryvtt-progress-clocks/releases/download/v1.4.2/build.zip", - "version": "1.4.2", + "version": "1.5.0", "minimumCoreVersion": "0.7.0", - "compatibleCoreVersion": "9", + "compatibleCoreVersion": "10", + "compatibility": { + "minimum": "0.7.0", + "verified": "10" + }, "esmodules": ["scripts/init.mjs"], "styles": ["styles/clocks.css"] } diff --git a/module/scripts/systems/index.mjs b/module/scripts/systems/index.mjs index ac82dcd..b169d19 100644 --- a/module/scripts/systems/index.mjs +++ b/module/scripts/systems/index.mjs @@ -1,5 +1,6 @@ import DND5E from "./dnd5e.mjs"; import BitD from "./blades-in-the-dark.mjs"; +import { getFoundryVersion } from "../utils.mjs"; const SUPPORTED_SYSTEMS = { "blades-in-the-dark": "BitD", @@ -33,11 +34,16 @@ export const getSystemMapping = id => { }; if (!SUPPORTED_SYSTEMS[id]) { + const types = ( + getFoundryVersion(game).major > 9 ? + game.system.template.Actor.types : + game.data.system.template.Actor.types + ); return { id, ...defaultSystemConfig, registerSheetOptions: { - types: game.data.system.template.Actor.types + types: types } }; } diff --git a/package-lock.json b/package-lock.json index f54ef85..2363388 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "foundryvtt-progress-clocks", - "version": "1.4.2", + "version": "1.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "foundryvtt-progress-clocks", - "version": "1.4.2", + "version": "1.5.0", "license": "MIT", "devDependencies": { "ava": "^4.3.1" diff --git a/package.json b/package.json index d4a058f..afd4705 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "foundryvtt-progress-clocks", - "version": "1.4.2", + "version": "1.5.0", "description": "Brings Forged in the Dark style progress clocks to your FoundryVTT games.", - "main": "module/scripts/init.js", + "main": "module/scripts/init.mjs", "scripts": { "clean": "rm build.zip", - "package": "cd module && zip -r ../build.zip . -x src\\* && cd ..", + "package": "cd module && zip -r ../build.zip . && cd ..", "release": "npm test && npm run package", "test": "ava" },