mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Added a system setting (appearance) to remove the Countdown UI (#1265)
This commit is contained in:
parent
6408528319
commit
c4b227de41
4 changed files with 14 additions and 4 deletions
|
|
@ -167,12 +167,14 @@ Hooks.on('setup', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Hooks.on('ready', async () => {
|
Hooks.on('ready', async () => {
|
||||||
|
const appearanceSettings = game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance);
|
||||||
ui.resources = new CONFIG.ui.resources();
|
ui.resources = new CONFIG.ui.resources();
|
||||||
if (game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance).displayFear !== 'hide')
|
if (appearanceSettings.displayFear !== 'hide') ui.resources.render({ force: true });
|
||||||
ui.resources.render({ force: true });
|
|
||||||
|
|
||||||
|
if (appearanceSettings.displayCountdownUI) {
|
||||||
ui.countdowns = new CONFIG.ui.countdowns();
|
ui.countdowns = new CONFIG.ui.countdowns();
|
||||||
ui.countdowns.render({ force: true });
|
ui.countdowns.render({ force: true });
|
||||||
|
}
|
||||||
|
|
||||||
if (!(ui.compendiumBrowser instanceof applications.ui.ItemBrowser))
|
if (!(ui.compendiumBrowser instanceof applications.ui.ItemBrowser))
|
||||||
ui.compendiumBrowser = new applications.ui.ItemBrowser();
|
ui.compendiumBrowser = new applications.ui.ItemBrowser();
|
||||||
|
|
|
||||||
|
|
@ -2219,6 +2219,9 @@
|
||||||
"displayFear": {
|
"displayFear": {
|
||||||
"label": "Display Fear"
|
"label": "Display Fear"
|
||||||
},
|
},
|
||||||
|
"displayCountdownUI": {
|
||||||
|
"label": "Display Countdown UI"
|
||||||
|
},
|
||||||
"showGenericStatusEffects": {
|
"showGenericStatusEffects": {
|
||||||
"label": "Show Foundry Status Effects"
|
"label": "Show Foundry Status Effects"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ export default class DhAppearance extends foundry.abstract.DataModel {
|
||||||
choices: CONFIG.DH.GENERAL.fearDisplay,
|
choices: CONFIG.DH.GENERAL.fearDisplay,
|
||||||
initial: CONFIG.DH.GENERAL.fearDisplay.token.value
|
initial: CONFIG.DH.GENERAL.fearDisplay.token.value
|
||||||
}),
|
}),
|
||||||
|
displayCountdownUI: new BooleanField({ initial: true }),
|
||||||
diceSoNice: new SchemaField({
|
diceSoNice: new SchemaField({
|
||||||
hope: diceStyle({ fg: '#ffffff', bg: '#ffe760', outline: '#000000', edge: '#ffffff' }),
|
hope: diceStyle({ fg: '#ffffff', bg: '#ffe760', outline: '#000000', edge: '#ffffff' }),
|
||||||
fear: diceStyle({ fg: '#000000', bg: '#0032b1', outline: '#ffffff', edge: '#000000' }),
|
fear: diceStyle({ fg: '#000000', bg: '#0032b1', outline: '#ffffff', edge: '#000000' }),
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,10 @@
|
||||||
value=setting.displayFear
|
value=setting.displayFear
|
||||||
localize=true}}
|
localize=true}}
|
||||||
{{formGroup
|
{{formGroup
|
||||||
|
fields.displayCountdownUI
|
||||||
|
value=setting.displayCountdownUI
|
||||||
|
localize=true}}
|
||||||
|
{{formGroup
|
||||||
fields.showGenericStatusEffects
|
fields.showGenericStatusEffects
|
||||||
value=setting.showGenericStatusEffects
|
value=setting.showGenericStatusEffects
|
||||||
localize=true}}
|
localize=true}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue