From 26d412815a11a0b98f16ced9d077f0c31b6d08b6 Mon Sep 17 00:00:00 2001 From: George Brocklehurst Date: Sun, 20 Jul 2025 10:20:38 +0100 Subject: [PATCH] Remove unused template context. --- module/applications/dialogs/downtime.mjs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/module/applications/dialogs/downtime.mjs b/module/applications/dialogs/downtime.mjs index 6dcff693..d046146a 100644 --- a/module/applications/dialogs/downtime.mjs +++ b/module/applications/dialogs/downtime.mjs @@ -24,7 +24,6 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV actor.system.bonuses.rest[`${shortrest ? 'short' : 'long'}Rest`].longMoves } }; - this.nrChoices.total = { max: this.nrChoices.shortRest.max + this.nrChoices.longRest.max }; } get title() { @@ -64,10 +63,6 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV ); context.selectedActivity = this.selectedActivity; context.moveData = this.moveData; - context.nrCurrentChoices = Object.values(this.moveData).reduce((acc, category) => { - acc += Object.values(category.moves).reduce((acc, x) => acc + (x.selected ?? 0), 0); - return acc; - }, 0); const shortRestMovesSelected = Object.values(this.moveData.shortRest.moves).reduce( (acc, x) => acc + (x.selected ?? 0), @@ -88,10 +83,6 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV current: this.nrChoices.longRest.taken + longRestMovesSelected } }; - context.nrChoices.total = { - ...this.nrChoices.total, - current: context.nrChoices.shortRest.current + context.nrChoices.longRest.current - }; context.shortRestMoves = this.nrChoices.shortRest.max > 0 ? this.moveData.shortRest : null; context.longRestMoves = this.nrChoices.longRest.max > 0 ? this.moveData.longRest : null;