Transmit the cost options to ETL properly (fixes #238)
This commit is contained in:
+1
-1
@@ -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));
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user