Files
vermine2047/module/system/settings.mjs
T
uberwald 90de66d668
Release Creation / build (release) Failing after 1m28s
fix: Dice So Nice import v14 compat, override Foundry text colors for readability
- hooks.mjs: replace static dice-so-nice import with dynamic import
  using game.modules.get('dice-so-nice').id (path removed in v14)
- hooks.mjs: fix permission condition (|| -> &&), jQuery -> vanilla JS
- less/base.less: override --color-text-* and --button-text-color
  for both .themed.theme-dark (AppV2) and body.theme-dark (legacy apps)
- target #settings-config buttons + labels + hints for dark grays
2026-07-12 22:05:45 +02:00

40 lines
1.3 KiB
JavaScript

export const registerSettings = function () {
game.settings.register("vermine2047", "game-mode", {
name: game.i18n.localize("SETTINGS.world.game_mode.name"),
hint: game.i18n.localize("SETTINGS.world.game_mode.hint"),
scope: "system",
config: true,
type: String,
choices: {
"1": "Survie",
"2": "Cauchemar",
"3": "Apocalypse"
},
default: '1',
onChange: value => {
let el = document.querySelector('.game-mode');
el.id = 'game-mode-' + game.settings.get('vermine2047', 'game-mode')
switch (game.settings.get('vermine2047', 'game-mode')) {
case '1':
el.innerText = 'mode survie';
break;
case '2':
el.innerText = 'mode cauchemard'
break;
case '3':
el.innerText = 'mode apocalypse'
break;
}
}
});
game.settings.register("vermine2047", "first-run-tips-shown", {
name: game.i18n.localize("SETTINGS.world.first_run.name"),
hint: game.i18n.localize("SETTINGS.world.first_run.hint"),
scope: "system",
config: true,
type: Boolean,
default: false
});
}