From d8f8b7198cd95429678f892f4974e531352c431b Mon Sep 17 00:00:00 2001 From: sladecraven Date: Thu, 29 Sep 2022 20:04:27 +0200 Subject: [PATCH] #Fix 78 : add role level --- modules/pegasus-utility.js | 17 ++++++++++++++++- templates/item-power-sheet.html | 10 +++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/modules/pegasus-utility.js b/modules/pegasus-utility.js index f11858d..3854cc7 100644 --- a/modules/pegasus-utility.js +++ b/modules/pegasus-utility.js @@ -302,7 +302,7 @@ export class PegasusUtility { item = this.actor.items.get(data.uuid) } let itemFull = await PegasusUtility.searchItem(item) - console.log("DROPPED DATA", data.uuid) + //console.log("DROPPED DATA", data.uuid) if (game.user.isGM || token.actor.isOwner) { this.addItemDropToActor(token.actor, itemFull) } else { @@ -575,6 +575,21 @@ export class PegasusUtility { return undefined; } + /* -------------------------------------------- */ + static computeDistance() { + let mytarget = game.user.targets.first() + console.log("target", mytarget, mytarget) + let mytoken = _token + + if (mytarget) { + let dist = canvas.grid.measureDistances( + [{ ray: new Ray(mytoken.center, mytarget.center) }], + { gridSpaces: true }); + console.log("DIST", dist) + } else { + console.log("NO TARGET") + } + } /* -------------------------------------------- */ static getDefenseState(actorId) { return this.defenderStore[actorId]; diff --git a/templates/item-power-sheet.html b/templates/item-power-sheet.html index c057a78..19ab025 100644 --- a/templates/item-power-sheet.html +++ b/templates/item-power-sheet.html @@ -13,16 +13,20 @@
- + {{editor purchasedeffects target="system.purchasedeffects" button=true owner=owner editable=editable}}
+ +
- + {{editor description target="system.description" button=true owner=owner editable=editable}}
+ +
- + {{editor effects target="system.effects" button=true owner=owner editable=editable}}