[Feature] ActiveEffect Improvements (#439)

* Fixed so genericStatuses aren't shown in activeEffectConfig if turned off. Fixed localization of genericStatuses in Inventory-ItemV2.

* Effects with statuses on them will now add them as full additional effects so they show up on the token.

* Revert "Effects with statuses on them will now add them as full additional effects so they show up on the token."

This reverts commit 5afd7ae686.

* Redid it a better way

* Fixed so multiple statuses on an effect are still treated as active
This commit is contained in:
WBHarry 2025-07-28 15:32:19 +02:00 committed by GitHub
parent 0a944eb3d4
commit 2fbbf98f88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 83 additions and 13 deletions

View file

@ -66,12 +66,9 @@ export default class DHTokenHUD extends foundry.applications.hud.TokenHUD {
if (!status) continue;
if (status._id) {
if (status._id !== effect.id) continue;
} else {
if (effect.statuses.size !== 1) continue;
}
status.isActive = true;
if (effect.getFlag('core', 'overlay')) status.isOverlay = true;
break;
}
}

View file

@ -99,7 +99,17 @@ export default class DhActiveEffectConfig extends foundry.applications.sheets.Ac
async _preparePartContext(partId, context) {
const partContext = await super._preparePartContext(partId, context);
switch (partId) {
case 'changes':
case 'details':
const useGeneric = game.settings.get(
CONFIG.DH.id,
CONFIG.DH.SETTINGS.gameSettings.appearance
).showGenericStatusEffects;
if (!useGeneric) {
partContext.statuses = Object.values(CONFIG.DH.GENERAL.conditions).map(status => ({
value: status.id,
label: game.i18n.localize(status.name)
}));
}
break;
}