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

@ -2565,6 +2565,7 @@
"label": "Countdown Automation",
"hint": "Automatically progress countdowns based on their progression settings"
},
"hideHitMissForPlayers": { "label": "Hide Hit/Miss On Adversaries In Chat For Players" },
"levelupAuto": {
"label": "Levelup Automation",
"hint": "When you've made your choices and finish levelup, the numerical changes are automatically applied to your character."

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'));
});

View file

@ -8,10 +8,6 @@
value=setting.displayFear
localize=true}}
{{formGroup
fields.hideHitMissForPlayers
value=setting.hideHitMissForPlayers
localize=true}}
{{formGroup
fields.displayCountdownUI
value=setting.displayCountdownUI
localize=true}}

View file

@ -16,6 +16,7 @@
{{formGroup settingFields.schema.fields.vulnerableAutomation value=settingFields._source.vulnerableAutomation localize=true}}
{{formGroup settingFields.schema.fields.countdownAutomation value=settingFields._source.countdownAutomation localize=true}}
{{formGroup settingFields.schema.fields.hideHitMissForPlayers value=settingFields._source.hideHitMissForPlayers localize=true}}
{{formGroup settingFields.schema.fields.actionPoints value=settingFields._source.actionPoints localize=true}}
{{formGroup settingFields.schema.fields.hordeDamage value=settingFields._source.hordeDamage localize=true}}
{{formGroup settingFields.schema.fields.effects.fields.rangeDependent value=settingFields._source.effects.rangeDependent localize=true}}

View file

@ -1,6 +1,6 @@
<div class="roll-part target-section dice-roll" data-action="expandRoll">
<div class="roll-part-header"><div><span>{{pluralize currentTargets.length "DAGGERHEART.GENERAL.Target"}}</span></div></div>
{{#if (or isGM (not appearanceSettings.hideHitMissForPlayers))}}
{{#if (or isGM (not automationSettings.hideHitMissForPlayers))}}
<div class="roll-part-extra on-reduced">
<div class="wrapper">
{{#if (or (gt targetShort.hit 0) (gt targetShort.miss 0))}}