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