Transmit the cost options to ETL properly (fixes #238)

This commit is contained in:
Manuel Vögele
2022-10-14 11:32:34 +02:00
parent 8a91c8843d
commit 0896265f87
+1 -1
View File
@@ -150,7 +150,7 @@ export function buildCostFunction(token, shape) {
return (x, y, costOptions = {}) => {
costOptions.token = token;
const area = getAreaFromPositionAndShape({x, y}, shape);
const costs = area.map(space => canvas.terrain.cost({x: space.x, y: space.y, costOptions}));
const costs = area.map(space => canvas.terrain.cost({x: space.x, y: space.y}, costOptions));
return costs.reduce((max, current) => Math.max(max, current));
};
}