RC-47 | Setting | Display | Abbreviate Access
This commit is contained in:
parent
649a75843f
commit
7095d0d3f8
3 changed files with 21 additions and 0 deletions
|
|
@ -22,6 +22,12 @@
|
|||
"grip": "Grip",
|
||||
"glim": "Glim"
|
||||
}
|
||||
},
|
||||
"setting": {
|
||||
"abbrAccess": {
|
||||
"name": "Abbreviate Access Names",
|
||||
"hint": "Shortens the Access level names the way the book does. (e.g. \"Common\" becomes \"C\")"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,12 +12,14 @@ import { CryptDie } from "../dice/CryptDie.mjs";
|
|||
import helpers from "../handlebarHelpers/_index.mjs";
|
||||
import { Logger } from "../utils/Logger.mjs";
|
||||
import { registerDevSettings } from "../settings/devSettings.mjs";
|
||||
import { registerUserSettings } from "../settings/userSettings.mjs";
|
||||
|
||||
Hooks.once(`init`, () => {
|
||||
Logger.log(`Initializing`);
|
||||
|
||||
// #region Settings
|
||||
registerDevSettings();
|
||||
registerUserSettings()
|
||||
// #endregion
|
||||
|
||||
// #region Datamodels
|
||||
|
|
|
|||
13
module/settings/userSettings.mjs
Normal file
13
module/settings/userSettings.mjs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
export function registerUserSettings() {
|
||||
const userScope = game.release.generation >= 13 ? `user` : `client`;
|
||||
|
||||
game.settings.register(`ripcrypt`, `abbrAccess`, {
|
||||
name: `RipCrypt.setting.abbrAccess.name`,
|
||||
hint: `RipCrypt.setting.abbrAccess.hint`,
|
||||
scope: userScope,
|
||||
type: Boolean,
|
||||
config: true,
|
||||
default: false,
|
||||
requiresReload: false,
|
||||
});
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue