mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
.
This commit is contained in:
parent
f75468c9e0
commit
2002ac5654
8 changed files with 10 additions and 9 deletions
|
|
@ -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."
|
||||
|
|
|
|||
|
|
@ -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' }),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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}}
|
||||
|
|
|
|||
|
|
@ -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}}
|
||||
|
|
|
|||
|
|
@ -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))}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue