Split the module up into multiple files
This commit is contained in:
57
src/settings.js
Normal file
57
src/settings.js
Normal file
@@ -0,0 +1,57 @@
|
||||
export const settingsKey = "smart-doors";
|
||||
|
||||
function reloadGM() {
|
||||
if (game.user.isGM)
|
||||
location.reload()
|
||||
}
|
||||
|
||||
export function registerSettings() {
|
||||
game.settings.register(settingsKey, "dataVersion", {
|
||||
scope: "world",
|
||||
config: false,
|
||||
type: String,
|
||||
default: "fresh install"
|
||||
})
|
||||
game.settings.register(settingsKey, "doorControlSizeFactor", {
|
||||
name: "smart-doors.settings.doorControlSizeFactor.name",
|
||||
hint: "smart-doors.settings.doorControlSizeFactor.hint",
|
||||
scope: "client",
|
||||
config: true,
|
||||
type: Number,
|
||||
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: true,
|
||||
onChange: reloadGM,
|
||||
})
|
||||
game.settings.register(settingsKey, "toggleSecretDoors", {
|
||||
name: "smart-doors.settings.toggleSecretDoors.name",
|
||||
hint: "smart-doors.settings.toggleSecretDoors.hint",
|
||||
scope: "world",
|
||||
config: true,
|
||||
type: Boolean,
|
||||
default: true,
|
||||
})
|
||||
game.settings.register(settingsKey, "lockedDoorAlert", {
|
||||
name: "smart-doors.settings.lockedDoorAlert.name",
|
||||
hint: "smart-doors.settings.lockedDoorAlert.hint",
|
||||
scope: "world",
|
||||
config: true,
|
||||
type: Boolean,
|
||||
default: true,
|
||||
})
|
||||
game.settings.register(settingsKey, "synchronizedDoors", {
|
||||
name: "smart-doors.settings.synchronizedDoors.name",
|
||||
hint: "smart-doors.settings.synchronizedDoors.hint",
|
||||
scope: "world",
|
||||
config: true,
|
||||
type: Boolean,
|
||||
default: true,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user