mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 15:39:02 +01:00
Added manual input for Dice Resources
This commit is contained in:
parent
07e39a38e2
commit
4262bf7a97
5 changed files with 83 additions and 16 deletions
|
|
@ -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;
|
||||
}, {})
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue