Skip to content

Commit

Permalink
Make Holding Scene movement v10 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Jagusti committed Aug 14, 2022
1 parent f2ef20d commit f6da3ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wfrp4e-gm-toolkit.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ Hooks.once("devModeReady", ({ registerPackageDebugFlag }) => {

// Disable movement on holding scene
Hooks.on("preUpdateToken", (token, change) => {
GMToolkit.log(false, `${token.data.x} -> ${change?.x}, ${token.data.y} -> ${change?.y}`)
GMToolkit.log(false, `${token.x} -> ${change?.x}, ${token.y} -> ${change?.y}`)
if (!game.user.isGM && game.canvas.scene.name === game.settings.get("wfrp4e-gm-toolkit", "holdingScene")) {
if (change?.x) {change.x = token.data.x}
if (change?.y) {change.y = token.data.y}
if (change?.x) {change.x = token.x}
if (change?.y) {change.y = token.y}
}
})

Expand Down

0 comments on commit f6da3ac

Please sign in to comment.