Register some settings for the system, including some developer-only settings

This commit is contained in:
Oliver-Akins 2023-12-18 23:18:05 -07:00
parent a2a72792a2
commit 2026785b09
6 changed files with 43 additions and 0 deletions

View file

@ -1,4 +1,8 @@
{ {
"dotdungeon.settings.showAvatarOnSheet.name": "Show Avatar On Player Sheet",
"dotdungeon.settings.showAvatarOnSheet.description": "Determines whether or not to show the avatar to you on the Player Character sheets, turning this off will replace the image with a file picker so that you can still change the image from the character sheet.",
"dotdungeon.sheet.PlayerSheet": "PC Sheet", "dotdungeon.sheet.PlayerSheet": "PC Sheet",
"dotdungeon.sheet.AspectSheet": "Aspect Sheet", "dotdungeon.sheet.AspectSheet": "Aspect Sheet",

View file

@ -18,8 +18,15 @@ import * as hbs from "./handlebars.mjs";
import "./hooks/hotReload.mjs"; import "./hooks/hotReload.mjs";
// Misc Imports
import loadSettings from "./settings/index.mjs";
Hooks.once(`init`, () => { Hooks.once(`init`, () => {
console.debug(`.dungeon | Initializing`); console.debug(`.dungeon | Initializing`);
loadSettings();
game.boilerplate = { game.boilerplate = {
PlayerActor, PlayerActor,
AspectItem, AspectItem,

View file

@ -0,0 +1,11 @@
export default function() {
game.settings.register(`dotdungeon`, `showAvatarOnSheet`, {
name: `dotdungeon.settings.showAvatarOnSheet.name`,
hint: `dotdungeon.settings.showAvatarOnSheet.description`,
scope: `client`,
type: Boolean,
config: true,
default: true,
requiresReload: false,
});
};

View file

@ -0,0 +1,9 @@
export default function() {
game.settings.register(`dotdungeon`, `devMode`, {
scope: `client`,
type: Boolean,
config: false,
default: false,
requiresReload: false,
});
};

View file

@ -0,0 +1,7 @@
import registerClientSettings from "./client_settings.mjs";
import registerDevSettings from "./dev_settings.mjs";
export default function registerSettings() {
registerClientSettings();
registerDevSettings();
};

View file

@ -43,6 +43,11 @@
select, select:hover { select, select:hover {
cursor: pointer; cursor: pointer;
} }
.debug-data {
opacity: 60%;
font-family: $body-font;
}
} }
// Styling that doesn't belong to any particular part of my sheet // Styling that doesn't belong to any particular part of my sheet