Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
velara authored Feb 3, 2021
1 parent af80b04 commit 8cd4b00
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Hooks.once("dragRuler.ready", () => {
dragRuler.registerModule("pf2e-bleedingsky-data", speedProvider)
})

const speedProvider = function mySpeedProvider(token, playerColor) {
const type = token.actor.data.type;
if (type === "character") {
const baseSpeed = token.actor.data.data.attributes.speed.total;
return [
{ range: baseSpeed, color: playerColor },
{ range: baseSpeed * 2, color: 0xffff00 },
{ range: baseSpeed * 3, color: 0xff8000 },
];
} else {
const baseSpeed = token.actor.data.data.attributes.speed.value;
return [
{ range: baseSpeed, color: playerColor },
{ range: baseSpeed * 2, color: 0xffff00 },
{ range: baseSpeed * 3, color: 0xff8000 },
];
}
}

0 comments on commit 8cd4b00

Please sign in to comment.