chore(prototype): allow rebuild on any lane count to observe vehicle relocation sooner

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
haylanandClaude Bot committed 2026-10-05 22:45:56 +02:00
1 parent 69b94552c2
commit ea23aa1dc5
1 file changed
+3 -3
+3 -3
View File
@@ -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)