From aa5dfa655fcd8ac486c0d11cc93f9ccf011a933b Mon Sep 17 00:00:00 2001 From: ArthurErlich Date: Mon, 5 Oct 2026 22:16:17 +0200 Subject: [PATCH] fix(prototype): read path edges as EdgeIdDir Co-Authored-By: Claude Opus 5.5 --- mod/content/overtake_probe.script.tl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mod/content/overtake_probe.script.tl b/mod/content/overtake_probe.script.tl index e2f65eb..caef036 100644 --- a/mod/content/overtake_probe.script.tl +++ b/mod/content/overtake_probe.script.tl @@ -13,9 +13,10 @@ local function p(s : string) end local function edgeAt(mp : Engine.Component.MovePath) : EdgeId, boolean - local e = mp.path.edges[mp.dyn.pathPos.edgeIndex + 1] + -- path.edges is 1-based, elements are EdgeIdDir userdata (tealdef says {EdgeId, boolean}) + local e = (mp.path.edges as {any})[mp.dyn.pathPos.edgeIndex + 1] as UtilPathfinding.EdgeIdDir if e == nil then return nil, nil end - return e[1], e[2] + return e.edgeId, e.dir end local function turnaround(edge : EdgeId) : integer