Fix protection and other maintained status effects
Protection and other system status effects still had a duration when being maintained. Fixes #44
This commit is contained in:
@@ -134,13 +134,12 @@ export class PowerEffect {
|
||||
static async getStatus(label, name, favorite = true) {
|
||||
const effect = foundry.utils.deepClone(CONFIG.statusEffects.find((se) => se.label === label || se.name === label));
|
||||
effect.name = 'name' in effect ? effect.name : effect.label;
|
||||
effect.duration = {};
|
||||
if (!('flags' in effect)) {
|
||||
effect.flags = {};
|
||||
}
|
||||
effect.flags.swade = {};
|
||||
if (favorite) {
|
||||
if (!('swade' in effect.flags)) {
|
||||
effect.flags.swade = {};
|
||||
}
|
||||
effect.flags.swade.favorite = true;
|
||||
}
|
||||
effect.statuses ??= [];
|
||||
|
||||
Reference in New Issue
Block a user