Add setting to prevent the UserConfig from opening on loading Foundry (closes #9)
This commit is contained in:
parent
c626c981aa
commit
857aca3423
5 changed files with 46 additions and 5 deletions
22
module/settings/preventUserConfigOpen.mjs
Normal file
22
module/settings/preventUserConfigOpen.mjs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { __ID } from "../consts.mjs";
|
||||
|
||||
const key = `preventUserConfigOpen`;
|
||||
|
||||
const config = {
|
||||
name: `OFT.setting.${key}.name`,
|
||||
hint: `OFT.setting.${key}.hint`,
|
||||
scope: `user`,
|
||||
type: Boolean,
|
||||
default: false,
|
||||
config: true,
|
||||
requiresReload: false,
|
||||
};
|
||||
|
||||
export const preventUserConfigOpen = {
|
||||
value() {
|
||||
return game.settings.get(__ID, key);
|
||||
},
|
||||
register() {
|
||||
game.settings.register(__ID, key, config);
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue