Updated getFlag behaviour (#114)

Updated getFlag behaviour to use Document#getFlag rather than the depreciated PlaceableObject#getFlag. Due to the min core version being marked as 0.8.5, this won't cause a 0.7 compatability issue.
This commit is contained in:
Argonius-Angelus
2021-09-15 06:48:00 +01:00
committed by GitHub
parent 854903a314
commit 24f1e78092
+1 -1
View File
@@ -11,7 +11,7 @@ export function getSnapPointForToken(x, y, token) {
return new PIXI.Point(x, y);
}
if (canvas.grid.isHex && game.modules.get("hex-size-support")?.active && CONFIG.hexSizeSupport.getAltSnappingFlag(token)) {
if (token.getFlag("hex-size-support", "borderSize") % 2 === 0) {
if (token.document.getFlag("hex-size-support", "borderSize") % 2 === 0) {
const snapPoint = CONFIG.hexSizeSupport.findVertexSnapPoint(x, y, token, canvas.grid.grid)
return new PIXI.Point(snapPoint.x, snapPoint.y)
}