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

This commit is contained in:
WBHarry 2025-07-28 01:49:09 +02:00
parent 6d7401c874
commit 80f5198d77
3 changed files with 21 additions and 3 deletions

View file

@ -41,6 +41,14 @@ export default class DhActiveEffect extends ActiveEffect {
});
}
get localizedStatuses() {
const statusMap = new Map(foundry.CONFIG.statusEffects.map(status => [status.id, status.name]));
return this.statuses.map(x => ({
key: x,
name: game.i18n.localize(statusMap.get(x))
}));
}
async _preCreate(data, options, user) {
const update = {};
if (!data.img) {