Risk It All success chat message start

This commit is contained in:
Chris Ryan 2026-01-14 22:01:13 +10:00
parent 89ba240998
commit 70f4e5f4e5
6 changed files with 51 additions and 12 deletions

View file

@ -728,9 +728,8 @@ export default class CharacterSheet extends DHBaseActorSheet {
if (!result) return;
/* This could be avoided by baking config.costs into config.resourceUpdates. Didn't feel like messing with it at the time */
const costResources = result.costs
.filter(x => x.enabled)
.map(cost => ({ ...cost, value: -cost.value, total: -cost.total }));
const costResources = result.costs?.filter(x => x.enabled)
.map(cost => ({ ...cost, value: -cost.value, total: -cost.total })) || {};
config.resourceUpdates.addResources(costResources);
await config.resourceUpdates.updateResources();
}