From 4311a4762d016fddda08c69f92de33f9a2092717 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Thu, 6 Oct 2022 12:38:31 +0200 Subject: [PATCH] Fix #100 effect message --- modules/pegasus-actor.js | 7 ++++++- template.json | 1 + templates/item-effect-sheet.html | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index 5b7a683..93ad7b4 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -811,9 +811,11 @@ export class PegasusActor extends Actor { ChatMessage.create({ content: "Effects of this type cannot be applied while Immunity is applied" }) return } + if ( item.system.droptext && item.system.droptext.length > 0) { + ChatMessage.create( { content: `Effect ${item.name} message : ${item.system.droptext}`}) + } } - if (item.type == 'race') { this.applyRace(item) } else if (item.type == 'role') { @@ -2304,6 +2306,9 @@ export class PegasusActor extends Actor { return } + if ( item.type == "effect" && item.system.droptext && item.system.droptext.length > 0) { + ChatMessage.create( { content: `Effect ${item.name} message : ${item.system.droptext}`}) + } //console.log(">>>>> item", item.type, __isVehicleUnique[item.type]) if (__isVehicleUnique[item.type]) { let toDelList = [] diff --git a/template.json b/template.json index b454b12..9d94999 100644 --- a/template.json +++ b/template.json @@ -417,6 +417,7 @@ "affectstatus": false, "affectedstatus": "", "locked": false, + "droptext": "", "description": "" }, "race": { diff --git a/templates/item-effect-sheet.html b/templates/item-effect-sheet.html index 4d2042a..5f60028 100644 --- a/templates/item-effect-sheet.html +++ b/templates/item-effect-sheet.html @@ -85,7 +85,10 @@
  • - +
  • + +
  • +