Bring back the "tint secret doors" feature (resolves #7)

This partially reverts commit 42529d3df6.
This commit is contained in:
2021-07-20 11:03:03 +02:00
parent e20b259d99
commit 2ce7e57f43
5 changed files with 60 additions and 6 deletions

View File

@@ -1,5 +1,10 @@
export const settingsKey = "smart-doors";
function reloadGM() {
if (game.user.isGM)
location.reload()
}
export function registerSettings() {
game.settings.register(settingsKey, "dataVersion", {
scope: "world",
@@ -16,6 +21,15 @@ export function registerSettings() {
default: 1.5,
onChange: () => location.reload()
})
game.settings.register(settingsKey, "highlightSecretDoors", {
name: "smart-doors.settings.highlightSecretDoors.name",
hint: "smart-doors.settings.highlightSecretDoors.hint",
scope: "world",
config: true,
type: Boolean,
default: false,
onChange: reloadGM,
})
game.settings.register(settingsKey, "toggleSecretDoors", {
name: "smart-doors.settings.toggleSecretDoors.name",
hint: "smart-doors.settings.toggleSecretDoors.hint",