From 4dd7608b9550ba8ac996bda13985cb476f4bbce4 Mon Sep 17 00:00:00 2001 From: Blair McMillan Date: Mon, 17 Oct 2022 16:42:26 +1000 Subject: [PATCH 1/2] Allow non GM users --- module.json | 6 ++-- scripts/module.js | 86 +++++++++++++++++++++++------------------------ 2 files changed, 44 insertions(+), 48 deletions(-) diff --git a/module.json b/module.json index c564209..038e02e 100644 --- a/module.json +++ b/module.json @@ -22,12 +22,12 @@ "flags": { "allowBugReporter": true }, - "version": "2.1.4", + "version": "2.1.5", "minimumCoreVersion": "0.6.0", "compatibleCoreVersion": "10", "compatibility": { "minimum": "0.6.0", - "verified": "10.270" + "verified": "10.288" }, "scripts": [], "esmodules": [ @@ -54,8 +54,6 @@ } ], "packs": [], - "system": [], - "dependencies": [], "socket": false, "manifest": "https://github.com/League-of-Foundry-Developers/foundryvtt-forien-copy-environment/releases/latest/download/module.json", "download": "https://github.com/League-of-Foundry-Developers/foundryvtt-forien-copy-environment/releases/latest/download/module.zip", diff --git a/scripts/module.js b/scripts/module.js index f3e420a..b33f887 100644 --- a/scripts/module.js +++ b/scripts/module.js @@ -15,52 +15,50 @@ Hooks.once('devModeReady', ({registerPackageDebugFlag}) => { }); Hooks.on('renderSettings', function (app, html, data) { - if (game.user.isGM) { - new ContextMenu(html, 'div.game-system, ul#game-details', [ - { - name: game.i18n.localize('forien-copy-environment.menu.copy'), - icon: '', - callback: () => { - try { - Core.copyAsText(); - } catch (e) { - console.error('Copy Environment | Error copying game settings to clipboard', e); - } - }, + new ContextMenu(html, 'div.game-system, ul#game-details', [ + { + name: game.i18n.localize('forien-copy-environment.menu.copy'), + icon: '', + callback: () => { + try { + Core.copyAsText(); + } catch (e) { + console.error('Copy Environment | Error copying game settings to clipboard', e); + } }, - { - name: game.i18n.localize('forien-copy-environment.menu.save'), - icon: '', - callback: () => { - try { - Core.saveSummaryAsJSON(); - } catch (e) { - console.error('Copy Environment | Error copying game settings to JSON', e); - } - }, + }, + { + name: game.i18n.localize('forien-copy-environment.menu.save'), + icon: '', + callback: () => { + try { + Core.saveSummaryAsJSON(); + } catch (e) { + console.error('Copy Environment | Error copying game settings to JSON', e); + } }, - { - name: game.i18n.localize('forien-copy-environment.menu.export'), - icon: '', - callback: () => { - try { - Core.exportGameSettings(); - } catch (e) { - console.error('Copy Environment | Error exporting game settings', e); - } - }, + }, + { + name: game.i18n.localize('forien-copy-environment.menu.export'), + icon: '', + callback: () => { + try { + Core.exportGameSettings(); + } catch (e) { + console.error('Copy Environment | Error exporting game settings', e); + } }, - { - name: game.i18n.localize('forien-copy-environment.menu.import'), - icon: '', - callback: () => { - try { - Core.importGameSettingsQuick(); - } catch (e) { - console.error('Copy Environment | Error importing game settings', e); - } - }, + }, + { + name: game.i18n.localize('forien-copy-environment.menu.import'), + icon: '', + callback: () => { + try { + Core.importGameSettingsQuick(); + } catch (e) { + console.error('Copy Environment | Error importing game settings', e); + } }, - ]); - } + }, + ]); }); From 1fd403121d1fa0d46316a446ee9cfb23ae27b1de Mon Sep 17 00:00:00 2001 From: Blair McMillan Date: Mon, 17 Oct 2022 16:45:24 +1000 Subject: [PATCH 2/2] v2.1.5 --- changelog.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/changelog.md b/changelog.md index f799e99..fed4e8f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,13 @@ # Changelog +## v2.1.5 + +- Allow non-GM users to use the module. + - Fixes [#32](https://github.com/League-of-Foundry-Developers/foundryvtt-forien-copy-environment/issues/32) + - Users will see errors for any settings they do not have permission to update. +- Removed deprecated fields in module manifest. + - Fixes [#33](https://github.com/League-of-Foundry-Developers/foundryvtt-forien-copy-environment/issues/33) + ## v2.1.4 - Added timestamp to file export.