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 @@