diff --git a/module/deltagreen.js b/module/deltagreen.js index 9c46488..726f509 100644 --- a/module/deltagreen.js +++ b/module/deltagreen.js @@ -263,6 +263,18 @@ Handlebars.registerHelper('playerHasGamemasterPrivileges', function(){ return game.user.isGM; }); +Handlebars.registerHelper('showImpossibleLandscapesContent', function() { + + let result = false; + let setting = game.settings.get("deltagreen", "showImpossibleLandscapesContent"); + + if(game.user.isGM === true && setting === true){ + result = true; + } + + return result +}); + Hooks.once("ready", async function() { // Wait to register hotbar drop hook on ready so that modules could register earlier if they want to Hooks.on("hotbarDrop", (bar, data, slot) => createDeltaGreenMacro(data, slot)); diff --git a/module/settings.js b/module/settings.js index f69ef5e..7bc36f5 100644 --- a/module/settings.js +++ b/module/settings.js @@ -62,6 +62,13 @@ export const registerSystemSettings = function() { } }); - + game.settings.register('deltagreen', 'showImpossibleLandscapesContent', { + name: "Show Impossible Landscapes Content", + hint: "Show Impossible Landscapes-specific fields from character sheets.", + scope: "world", + config: true, + type: Boolean, + default: true + }); } \ No newline at end of file diff --git a/templates/actor/cv-partial.html b/templates/actor/cv-partial.html index 336975f..f307198 100644 --- a/templates/actor/cv-partial.html +++ b/templates/actor/cv-partial.html @@ -21,7 +21,7 @@ -{{#if (playerHasGamemasterPrivileges)}} +{{#if (showImpossibleLandscapesContent)}}
{{localize 'DG.ImpossibleLanscapes.IHaveSeenThe'}}