diff --git a/langs/en-ca.json b/langs/en-ca.json index b11a301..2b76a00 100644 --- a/langs/en-ca.json +++ b/langs/en-ca.json @@ -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.AspectSheet": "Aspect Sheet", diff --git a/module/dotdungeon.js b/module/dotdungeon.js index 90801d1..4b0b91d 100644 --- a/module/dotdungeon.js +++ b/module/dotdungeon.js @@ -18,8 +18,15 @@ import * as hbs from "./handlebars.mjs"; import "./hooks/hotReload.mjs"; +// Misc Imports +import loadSettings from "./settings/index.mjs"; + + Hooks.once(`init`, () => { console.debug(`.dungeon | Initializing`); + + loadSettings(); + game.boilerplate = { PlayerActor, AspectItem, diff --git a/module/settings/client_settings.mjs b/module/settings/client_settings.mjs new file mode 100644 index 0000000..d319fd8 --- /dev/null +++ b/module/settings/client_settings.mjs @@ -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, + }); +}; \ No newline at end of file diff --git a/module/settings/dev_settings.mjs b/module/settings/dev_settings.mjs new file mode 100644 index 0000000..a43a128 --- /dev/null +++ b/module/settings/dev_settings.mjs @@ -0,0 +1,9 @@ +export default function() { + game.settings.register(`dotdungeon`, `devMode`, { + scope: `client`, + type: Boolean, + config: false, + default: false, + requiresReload: false, + }); +}; \ No newline at end of file diff --git a/module/settings/index.mjs b/module/settings/index.mjs new file mode 100644 index 0000000..bd590ca --- /dev/null +++ b/module/settings/index.mjs @@ -0,0 +1,7 @@ +import registerClientSettings from "./client_settings.mjs"; +import registerDevSettings from "./dev_settings.mjs"; + +export default function registerSettings() { + registerClientSettings(); + registerDevSettings(); +}; \ No newline at end of file diff --git a/styles/root.scss b/styles/root.scss index 7c29012..e8a1408 100644 --- a/styles/root.scss +++ b/styles/root.scss @@ -43,6 +43,11 @@ select, select:hover { cursor: pointer; } + + .debug-data { + opacity: 60%; + font-family: $body-font; + } } // Styling that doesn't belong to any particular part of my sheet