From 0896265f87fa8a4141ad1a8b1e7aa0e51aecdf46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Fri, 14 Oct 2022 11:32:34 +0200 Subject: [PATCH] Transmit the cost options to ETL properly (fixes #238) --- src/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api.js b/src/api.js index e96e1e0..42bed80 100644 --- a/src/api.js +++ b/src/api.js @@ -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)); }; }