This commit is contained in:
WBHarry 2026-03-07 18:36:25 +01:00
parent f75468c9e0
commit 2002ac5654
8 changed files with 10 additions and 9 deletions

View file

@ -25,7 +25,6 @@ export default class DhAppearance extends foundry.abstract.DataModel {
choices: CONFIG.DH.GENERAL.fearDisplay,
initial: CONFIG.DH.GENERAL.fearDisplay.token.value
}),
hideHitMissForPlayers: new BooleanField({ initial: false }),
displayCountdownUI: new BooleanField({ initial: true }),
diceSoNice: new SchemaField({
hope: diceStyle({ fg: '#ffffff', bg: '#ffe760', outline: '#000000', edge: '#ffffff' }),

View file

@ -27,6 +27,10 @@ export default class DhAutomation extends foundry.abstract.DataModel {
initial: true,
label: 'DAGGERHEART.SETTINGS.Automation.FIELDS.countdownAutomation.label'
}),
hideHitMissForPlayers: new fields.BooleanField({
initial: false,
label: 'DAGGERHEART.SETTINGS.Automation.FIELDS.hideHitMissForPlayers.label'
}),
levelupAuto: new fields.BooleanField({
required: true,
initial: true,

View file

@ -141,9 +141,9 @@ export default class DHRoll extends Roll {
async render({ flavor, template = this.constructor.CHAT_TEMPLATE, isPrivate = false, ...options } = {}) {
if (!this._evaluated) return;
const appearanceSettings = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance);
const automationSettings = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Automation);
const chatData = await this._prepareChatRenderContext({ flavor, isPrivate, ...options });
return foundry.applications.handlebars.renderTemplate(template, { ...chatData, appearanceSettings });
return foundry.applications.handlebars.renderTemplate(template, { ...chatData, automationSettings });
}
/** @inheritDoc */

View file

@ -70,7 +70,7 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
e.setAttribute('data-use-perm', document.testUserPermission(game.user, 'OWNER'));
const settings = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.appearance);
const settings = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Automation);
if (settings.hideHitMissForPlayers)
e.setAttribute('data-view-perm', document.testUserPermission(game.user, 'OBSERVER'));
});