From 12d6b7fa4c849ec6bde6f743f17d04ceea2f893d Mon Sep 17 00:00:00 2001 From: nsalyzyn Date: Fri, 19 Dec 2025 07:34:46 -0700 Subject: [PATCH] Marking up the places that need changing for bug #1160 --- module/applications/dialogs/downtime.mjs | 1 + module/data/actor/character.mjs | 1 + module/documents/activeEffect.mjs | 1 + 3 files changed, 3 insertions(+) diff --git a/module/applications/dialogs/downtime.mjs b/module/applications/dialogs/downtime.mjs index 96e06446..5241ae03 100644 --- a/module/applications/dialogs/downtime.mjs +++ b/module/applications/dialogs/downtime.mjs @@ -94,6 +94,7 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV getRefreshables() { const actionItems = this.actor.items.reduce((acc, x) => { + // TODO(nsalyzyn): Eliminate items that the are part of the subclass the actor doesn't have access to. if (x.system.actions) { const recoverable = x.system.actions.reduce((acc, action) => { if (refreshIsAllowed([this.shortrest ? 'shortRest' : 'longRest'], action.uses.recovery)) { diff --git a/module/data/actor/character.mjs b/module/data/actor/character.mjs index c5ab914c..13d4c97e 100644 --- a/module/data/actor/character.mjs +++ b/module/data/actor/character.mjs @@ -451,6 +451,7 @@ export default class DhCharacter extends BaseDataActor { } else if (item.system.originItemType === CONFIG.DH.ITEM.featureTypes.class.id) { classFeatures.push(item); } else if (item.system.originItemType === CONFIG.DH.ITEM.featureTypes.subclass.id) { + // TODO(nsalyzyn): Reuse this code for elsewhere if (this.class.subclass) { const prop = item.system.multiclassOrigin ? 'multiclass' : 'class'; const subclassState = this[prop].subclass?.system?.featureState; diff --git a/module/documents/activeEffect.mjs b/module/documents/activeEffect.mjs index fcf1d590..966e4852 100644 --- a/module/documents/activeEffect.mjs +++ b/module/documents/activeEffect.mjs @@ -196,6 +196,7 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { prepareDerivedData() { /* Preventing subclass features from transferring to actor if they do not have the right subclass advancement */ if (this.parent?.type === 'feature') { + // TODO(nsalyzyn): Reuse this code for elsewhere const origSubclassParent = this.parent.system.originItemType === 'subclass'; if (origSubclassParent) { const subclass = this.parent.parent.items.find(