Support for difficult terrain with tokens larger than 1x1

This commit is contained in:
Manuel Vögele
2021-03-15 20:17:38 +01:00
parent c4d089e8ff
commit 4f1dec3089
5 changed files with 46 additions and 11 deletions
+7
View File
@@ -97,6 +97,13 @@ export function getUnreachableColorFromSpeedProvider() {
}
}
export function getCostFromSpeedProvider(token, area) {
if (currentSpeedProvider instanceof Function) {
return SpeedProvider.prototype.getCostForStep.call(undefined, token, area);
}
return currentSpeedProvider.getCostForStep(token, area);
}
export function registerModule(moduleId, speedProvider) {
// Check if a module with the given id exists and is currently enabled
const module = game.modules.get(moduleId)