Merge branch 'main' into feature/group-roll-rework

This commit is contained in:
WBHarry 2026-04-06 00:33:36 +02:00
commit 6c761b1840
8 changed files with 69 additions and 27 deletions

View file

@ -2869,6 +2869,7 @@
"system": "Dice Preset", "system": "Dice Preset",
"font": "Font", "font": "Font",
"critical": "Duality Critical Animation", "critical": "Duality Critical Animation",
"muted": "Muted",
"diceAppearance": "Dice Appearance", "diceAppearance": "Dice Appearance",
"animations": "Animations", "animations": "Animations",
"defaultAnimations": "Set Animations As Player Defaults", "defaultAnimations": "Set Animations As Player Defaults",

View file

@ -708,14 +708,14 @@ const getDiceSoNiceSFX = sfxOptions => {
if (sfxOptions.critical && criticalAnimationData.class) { if (sfxOptions.critical && criticalAnimationData.class) {
return { return {
specialEffect: criticalAnimationData.class, specialEffect: criticalAnimationData.class,
options: {} options: { ...criticalAnimationData.options }
}; };
} }
if (sfxOptions.higher && sfxOptions.data.higher) { if (sfxOptions.higher && sfxOptions.data.higher) {
return { return {
specialEffect: sfxOptions.data.higher.class, specialEffect: sfxOptions.data.higher.class,
options: {} options: { ...sfxOptions.data.higher.options }
}; };
} }

View file

@ -8,6 +8,9 @@ export default class DhAppearance extends foundry.abstract.DataModel {
initial: null, initial: null,
blank: true, blank: true,
choices: CONFIG.DH.GENERAL.diceSoNiceSFXClasses choices: CONFIG.DH.GENERAL.diceSoNiceSFXClasses
}),
options: new foundry.data.fields.SchemaField({
muteSound: new foundry.data.fields.BooleanField()
}) })
}); });

View file

@ -345,7 +345,7 @@ export async function runMigrations() {
if (foundry.utils.isNewerVersion('2.0.4', lastMigrationVersion)) { if (foundry.utils.isNewerVersion('2.0.4', lastMigrationVersion)) {
const downtimeMoves = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew); const downtimeMoves = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew);
if (restMoves.longRest.moves.repairArmor) { if (downtimeMoves.restMoves.longRest.moves.repairArmor) {
await downtimeMoves.updateSource({ await downtimeMoves.updateSource({
'restMoves.longRest.moves.repairArmor': defaultRestOptions.longRest().repairArmor 'restMoves.longRest.moves.repairArmor': defaultRestOptions.longRest().repairArmor
}); });

View file

@ -68,5 +68,29 @@
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
} }
color-picker {
gap: 4px;
background: inherit;
}
}
.animation-container {
display: flex;
align-items: center;
justify-content: space-between;
.animation-inner-container {
display: flex;
align-items: center;
justify-content: right;
gap: 8px;
.animation-control {
display: flex;
align-items: center;
gap: 2px;
}
}
} }
} }

View file

@ -9,9 +9,16 @@
{{/if}} {{/if}}
<div class="form-group"> <div class="form-group">
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.critical"}}</label> <label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.critical"}}</label>
<div class="form-fields">
<div class="form-fields"> <div class="form-fields">
{{formInput fields.diceSoNice.fields.sfx.fields.critical.fields.class value=setting.diceSoNice.sfx.critical.class blank="" localize=true}} {{formInput fields.diceSoNice.fields.sfx.fields.critical.fields.class value=setting.diceSoNice.sfx.critical.class blank="" localize=true}}
</div> </div>
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.muted"}}</label>
<div class="form-fields">
{{formInput fields.diceSoNice.fields.sfx.fields.critical.fields.options.fields.muteSound value=setting.diceSoNice.sfx.critical.options.muteSound localize=true}}
</div>
</div>
</div> </div>
</div> </div>
<section class='tab-navigation'> <section class='tab-navigation'>

View file

@ -42,9 +42,15 @@
{{#if animations}} {{#if animations}}
<h3>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.animations"}}</h3> <h3>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.animations"}}</h3>
<div class="label-container full-width"> <div class="animation-container">
<label>{{localize "DAGGERHEART.CONFIG.DaggerheartDiceAnimationEvents.higher.name"}}</label> <label>{{localize "DAGGERHEART.CONFIG.DaggerheartDiceAnimationEvents.higher.name"}}</label>
<div class="animation-inner-container">
{{formInput fields.sfx.fields.higher.fields.class value=values.sfx.higher.class blank="" localize=true}} {{formInput fields.sfx.fields.higher.fields.class value=values.sfx.higher.class blank="" localize=true}}
<div class="animation-control">
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.muted"}}</label>
{{formInput fields.sfx.fields.higher.fields.options.fields.muteSound value=values.sfx.higher.options.muteSound localize=true}}
</div>
</div>
</div> </div>
{{/if}} {{/if}}

View file

@ -33,6 +33,7 @@
<div class="roll-formula">{{total}}</div></span></label> <div class="roll-formula">{{total}}</div></span></label>
{{/if}} {{/if}}
<div class="roll-dice"> <div class="roll-dice">
{{#if dice.length}}
{{#each dice}} {{#each dice}}
{{#each results}} {{#each results}}
{{#unless discarded}} {{#unless discarded}}
@ -53,11 +54,11 @@
<div class="font-20">{{modifierTotal}}</div> <div class="font-20">{{modifierTotal}}</div>
</div> </div>
{{/if}} {{/if}}
{{#unless dice.length}} {{else}}
<div class="roll-die"> <div class="roll-die">
<div class="font-20">{{total}}</div> <div class="font-20">{{total}}</div>
</div> </div>
{{/unless}} {{/if}}
</div> </div>
{{/each}} {{/each}}
</fieldset> </fieldset>