Add setting to prevent the UserConfig from opening on loading Foundry (closes #9)

This commit is contained in:
Eldritch-Oliver 2025-11-22 16:46:45 -07:00
parent c626c981aa
commit 857aca3423
5 changed files with 46 additions and 5 deletions

View 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);
},
};