From 74a2b434c76a1a9dfb615016f3cecfba254fd6fb Mon Sep 17 00:00:00 2001 From: sladecraven Date: Sat, 30 Jul 2022 22:44:44 +0200 Subject: [PATCH] Managedeletion --- modules/pegasus-actor.js | 28 ++++++++++++++++++---------- system.json | 2 +- templates/actor-sheet.html | 2 +- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index f66f51d..8345301 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -836,13 +836,16 @@ export class PegasusActor extends Actor { // Severe Trauma management if (this.getTraumaState() == "severetrauma") { - let chatData = { - user: game.user.id, - rollMode: game.settings.get("core", "rollMode"), - whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')) + if ( !this.severeTraumaMessage) { + let chatData = { + user: game.user.id, + rollMode: game.settings.get("core", "rollMode"), + whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')) + } + chatData.content = `
${this.name} is suffering from Severe Trauma and cannot use Perks at this time.${this.name} is suffering from Severe Trauma and cannot use Perks at this time. Current -  -/+ + +/ -  Mod