Skip to content

Commit

Permalink
Add offset stuff, also add en json
Browse files Browse the repository at this point in the history
  • Loading branch information
ChasarooniZ committed Dec 21, 2023
1 parent bf19164 commit f88d05f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion scripts/helpers/anim.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,10 @@ export function shakeOnDamageToken(actor_uuid) {
export function turnTokenOnAttack(token, target) {
if (!token || !target || token === target) return;
const angle = token.angle;
const angle_offset = token.data.flags?.["pf2e-rpg-numbers"]?.rotationOffset ?? 0;
new Sequence().animation()
.on(token)
.rotateTowards(target, { duration: 500, ease: 'easeInCubic' })
.rotateTowards(target, { duration: 500, ease: 'easeInCubic', offset: angle_offset })
.waitUntilFinished(250)
.animation()
.on(token)
Expand Down
4 changes: 2 additions & 2 deletions scripts/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ Hooks.on("ready", () => {
moduleId: MODULE_ID,
tab: {
name: MODULE_ID,
label: "PF2e RPG #s",
label: game.i18n.localize("pf2e-rpg-numbers.options.tab-label"),
icon: "fas fa-dragon"
},
"rotationOffset": {
type: "range",
label: game.i18n.localize("pf2e-rpg-numbers.options.rotationOffset"),
label: game.i18n.localize("pf2e-rpg-numbers.options.rotation-offset"),
default: 0,
min: 0,
max: 360,
Expand Down

0 comments on commit f88d05f

Please sign in to comment.