This commit is contained in:
CDeenen
2021-04-13 02:30:10 +02:00
parent cc9bcf4770
commit 1552ae6fe8
19 changed files with 538 additions and 170 deletions

View File

@@ -1,5 +1,6 @@
import * as MODULE from "../MaterialDeck.js";
import {streamDeck} from "../MaterialDeck.js";
import {compatibleCore} from "./misc.js";
export class Move{
constructor(){
@@ -106,7 +107,9 @@ export class Move{
if (rotType == 'by') rotationVal = token.data.rotation + value;
else if (rotType == 'to') rotationVal = value;
token.update({rotation: rotationVal});
if (compatibleCore("0.8.1")) token.document.update({rotation: rotationVal});
else token.update({rotation: rotationVal});
//token.rotate(rotationVal,false)
}
}
@@ -140,7 +143,8 @@ export class Move{
canvas.animatePan(location);
}
if (game.user.isGM == false && (token.can(game.user,"control") == false || token.checkCollision(token.getCenter(x, y)))) return;
token.update({x:x,y:y});
if (compatibleCore("0.8.1")) token.document.update({x:x,y:y});
else token.update({x:x,y:y});
};
moveCanvas(dir){