From 93d13a0b47236930a54d096c9920767c8122727d Mon Sep 17 00:00:00 2001 From: Mike Bloy Date: Sun, 11 Aug 2024 13:56:01 -0500 Subject: [PATCH] move effect description to description field Since Visual Active Effects did away with the special collapsable description field, moved the active effect description for power effects to the effect's 'description' field. --- CHANGELOG.md | 2 ++ src/module/powers/basePowers.js | 11 ++--------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96f3f12..02b0718 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - #44: protection effect and other default system effects still had duration when added by the power effect, instead of maintaining their own effect. +- Since VAE did away with the collapsable extra description, moved the spell + description to the main 'description' field of active effects. ## [3.1.1] 2024-07-26 diff --git a/src/module/powers/basePowers.js b/src/module/powers/basePowers.js index 7ec9898..114eabb 100644 --- a/src/module/powers/basePowers.js +++ b/src/module/powers/basePowers.js @@ -555,13 +555,10 @@ export class PowerEffect { if (moduleHelpers.useVAE) { doc.flags['visual-active-effects'] = { data: { - content: this.description, inclusion: 1, }, }; - } else { - doc.description += this.description; - } + doc.description += this.description; doc.statuses = doc.statuses ?? []; doc.statuses.push('powerEffect'); doc.flags[moduleName].maintId = maintId; @@ -579,11 +576,7 @@ export class PowerEffect { } const doc = this.createEffectDocument(icon, `Maintaining ${this.effectName}`, this.getMaintainEffectChanges()); doc.duration.rounds = this.duration; - if (moduleHelpers.useVAE) { - doc.flags['visual-active-effects'] = { data: { content: this.description } }; - } else { - doc.description += this.description; - } + doc.description += this.description; doc.flags.swade.expiration = CONFIG.SWADE.CONST.STATUS_EFFECT_EXPIRATION.EndOfTurnPrompt; doc.flags.swade.loseTurnOnHold = true; doc.flags[moduleName].maintainingId = maintId;