mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[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:
parent
0a944eb3d4
commit
2fbbf98f88
6 changed files with 83 additions and 13 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue