Always allow the GM to use pathfinding

This commit is contained in:
Manuel Vögele
2022-02-01 11:33:33 +01:00
parent 41c8979925
commit a252da620a
6 changed files with 22 additions and 15 deletions
+7
View File
@@ -272,3 +272,10 @@ export function getMeasurePosition() {
const measurePosition = {x: mousePosition.x + rulerOffset.x, y: mousePosition.y + rulerOffset.y};
return measurePosition;
}
// isGM function for use during loading when game.user isn't available yet
export function early_isGM() {
const level = game.data.users.find(u => u._id == game.data.userId).role;
const gmLevel = CONST.USER_ROLES.ASSISTANT;
return level >= gmLevel;
}