From 40500ee2ce9ffa9cf2292b4517df5a13d7c0ab7d Mon Sep 17 00:00:00 2001 From: p4535992 Date: Sun, 25 Sep 2022 15:10:56 +0200 Subject: [PATCH] version 2.2.8 --- changelog.md | 3 +++ gulpfile.js | 4 +++- package.json | 2 +- src/module.json | 16 ++++++---------- src/scripts/ArmsReachHelper.ts | 6 ++---- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/changelog.md b/changelog.md index 595a74f..7d06127 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,7 @@ # CHANGELOG +### 2.2.8 + +- Added french language ### 2.2.6-7 diff --git a/gulpfile.js b/gulpfile.js index 7dfae1e..9557ecd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -537,7 +537,9 @@ async function packageBuild() { zip.pipe(zipFile); // Add the directory with the final code - zip.directory(`dist/`, manifest.file.name); + // zip.directory(`dist/`, manifest.file.name); + const moduleJson = JSON.parse(fs.readFileSync('./src/module.json')); + zip.directory(`dist/`, moduleJson.id); /* MOD 4535992 zip.file(`dist/module.json`, { name: `module.json` }); zip.file(`dist/bundle.js`, { name: `bundle.js` }); diff --git a/package.json b/package.json index 87297ee..c867eef 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "foundryvtt-arms-reach", "title": "FoundryVTT Arms Reach", "description": "Allows the GM to limit the distance that a player can interacted with a placeable object like door, journal, stairway, token, ecc..", - "version": "2.2.7", + "version": "2.2.8", "main": "foundryvtt-arms-reach.js", "scripts": { "publish": "gulp publish --update", diff --git a/src/module.json b/src/module.json index ae4d5e0..6183c6f 100644 --- a/src/module.json +++ b/src/module.json @@ -2,7 +2,7 @@ "id": "foundryvtt-arms-reach", "title": "FoundryVTT Arms Reach", "description": "Allows the GM to limit the distance that a player can interacted with a placeable object like door, journal, stairway, token, ecc..", - "version": "2.2.7", + "version": "2.2.8", "authors": [ { "name": "Psyny" @@ -67,12 +67,8 @@ "packs": [], "systems": [], "scripts": [], - "esmodules": [ - "foundryvtt-arms-reach.js" - ], - "styles": [ - "styles/foundryvtt-arms-reach.css" - ], + "esmodules": ["foundryvtt-arms-reach.js"], + "styles": ["styles/foundryvtt-arms-reach.css"], "compatibility": { "minimum": 10, "verified": 10, @@ -82,8 +78,8 @@ "url": "https://github.com/p4535992/foundryvtt-arms-reach", "manifest": "https://github.com/p4535992/foundryvtt-arms-reach/releases/latest/download/module.json", "download": "https://github.com/p4535992/foundryvtt-arms-reach/releases/latest/download/module.zip", - "readme": "https://github.com/p4535992/foundryvtt-arms-reach/blob/v2.2.7/README.md", - "changelog": "https://github.com/p4535992/foundryvtt-arms-reach/blob/v2.2.7/changelog.md", + "readme": "https://github.com/p4535992/foundryvtt-arms-reach/blob/v2.2.8/README.md", + "changelog": "https://github.com/p4535992/foundryvtt-arms-reach/blob/v2.2.8/changelog.md", "bugs": "https://github.com/p4535992/foundryvtt-arms-reach/issues", "allowBugReporter": true, "relationships": { @@ -104,4 +100,4 @@ ], "conflicts": [] } -} \ No newline at end of file +} diff --git a/src/scripts/ArmsReachHelper.ts b/src/scripts/ArmsReachHelper.ts index 1a64b28..8da1ec8 100644 --- a/src/scripts/ArmsReachHelper.ts +++ b/src/scripts/ArmsReachHelper.ts @@ -222,10 +222,8 @@ export const getFirstPlayerToken = function (): Token | null { if (game.settings.get(CONSTANTS.MODULE_NAME, "useOwnedTokenIfNoTokenIsSelected")) { if (!controlled.length || controlled.length === 0) { // If no token is selected use the token of the users character - token = ( - //@ts-ignore - canvas.tokens?.placeables.find((token) => token.document.actorId === game.user?.character?.id) - ); + token = //@ts-ignore + canvas.tokens?.placeables.find((token) => token.document.actorId === game.user?.character?.id); } // If no token is selected use the first owned token of the users character you found if (!token) {