From ea23aa1dc5737105a15eb660aeddac4a94a69862 Mon Sep 17 00:00:00 2001 From: ArthurErlich Date: Mon, 5 Oct 2026 22:45:56 +0200 Subject: [PATCH] chore(prototype): allow rebuild on any lane count to observe vehicle relocation sooner Co-Authored-By: Claude Opus 5.5 --- mod/content/overtake_probe.script.tl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/content/overtake_probe.script.tl b/mod/content/overtake_probe.script.tl index e9e7a8a..96cf774 100644 --- a/mod/content/overtake_probe.script.tl +++ b/mod/content/overtake_probe.script.tl @@ -41,7 +41,7 @@ local record ProbeState watch : {integer} -- vehicles involved in the last rebuild, flagged in later dumps end --- Two-way = exactly two driving lanes (modes other than the sidewalk ones). No edge objects (stops, signals), +-- No edge objects (stops, signals), -- because re-adding them is out of scope for this probe. local function rebuildable(seg : integer) : boolean, string local be = api.engine.getComponent(seg, api.type.ComponentType.BASE_EDGE) as Engine.Component.BaseEdge @@ -55,8 +55,8 @@ local function rebuildable(seg : integer) : boolean, string if on and (tonumber(tostring(k)) or 0) >= 2 then driving = driving + 1 break end end end - if driving ~= 2 then return false, "driving lanes=" .. driving end - return true, string.format("template=%s length=%.1f", tostring(be.roadTemplate), be.distance) + -- any lane count: what a rebuild does to vehicles on the segment doesn't depend on it + return true, string.format("drivingLanes=%d template=%s length=%.1f", driving, tostring(be.roadTemplate), be.distance) end local function rebuild(seg : integer)