add setting to hide impossible landscapes content

This commit is contained in:
TheLastScrub
2023-08-03 22:04:51 -07:00
parent 49075e3797
commit de96d5ad17
3 changed files with 21 additions and 2 deletions
+12
View File
@@ -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));
+8 -1
View File
@@ -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
});
}
+1 -1
View File
@@ -21,7 +21,7 @@
<input class="fill-remaining-space" type="text" name="system.biography.education" value="{{actor.system.biography.education}}" data-dtype="String" placeholder="{{localize 'DG.CV.EducationPlaceholder'}}" />
</div>
{{#if (playerHasGamemasterPrivileges)}}
{{#if (showImpossibleLandscapesContent)}}
<div class="yellow-king yellow-king-grid-9col">
<span class="yellow-king yellow-king-rotate2">{{localize 'DG.ImpossibleLanscapes.IHaveSeenThe'}}</span>