Added manual input for Dice Resources

This commit is contained in:
WBHarry 2025-07-13 21:05:52 +02:00
parent 07e39a38e2
commit 4262bf7a97
5 changed files with 83 additions and 16 deletions

View file

@ -700,14 +700,14 @@ export default class CharacterSheet extends DHBaseActorSheet {
const rollValues = await game.system.api.applications.dialogs.ResourceDiceDialog.create(
item.name,
item.system.resource.recovery,
this.document.name,
this.document,
item.system.resource
);
if (!rollValues) return;
await item.update({
'system.resource.diceStates': rollValues.reduce((acc, value, index) => {
acc[index] = { value, used: false };
'system.resource.diceStates': rollValues.reduce((acc, state, index) => {
acc[index] = { value: state.value, used: state.used };
return acc;
}, {})
});