CI / quality (push) Failing after 1m9s
MapBuilder.luau
- Suppress the aux lane across samples 525-550 (AUX_SUPPRESS_FROM/TO),
honoring the user's hand deletion in Studio so a rebuild no longer
regenerates it.
- Smoothstep the width ramp over AUX_BLEND=5 samples on each side. A hard
cut produced a 26-stud lateral fence jog; the blend removes it.
- DO NOT remove this suppression. Re-enabling it resurrects geometry the
user deleted by hand.
rokit.toml
- rojo 7.5.1 -> 7.7.0 to match the auto-updating Studio plugin.
Server older than plugin fails the handshake with
"attempt to index number with 'protocolVersion'".
tools/
- 34 read-only probe/verify/capture scripts used to measure the datamodel
instead of reasoning from source.
Verified-good baseline at this commit:
total parts 16788
PAWestSlip 60 segs, 34.4 deg total bend, worst 1.4, 0 kinks >5
PAEastSlip 60 segs, 30.7 deg total bend, worst 1.3, 0 kinks >5
AuxLane parts 30 (samples 525-550 deliberately absent)
barrier coverage 823 samples, 0 unguarded
fence jogs >10st 0
81 lines
3.0 KiB
Luau
81 lines
3.0 KiB
Luau
-- The crux of the user's request: does the ramp run PARALLEL to the highway
|
|
-- (travelling far along it while climbing), or does it dive off the side?
|
|
-- Measures longitudinal progress (in mainline samples) vs vertical drop vs
|
|
-- lateral drift, plus the actual grade. Also finds what the ramp passes over.
|
|
local ws = game:GetService("Workspace")
|
|
local RS = game:GetService("ReplicatedStorage")
|
|
local Circuit = require(RS:WaitForChild("Shared"):WaitForChild("Circuit"))
|
|
local samples = Circuit.samples
|
|
local map = ws:FindFirstChild("Map")
|
|
if not map then return "NOMAP" end
|
|
local out = {}
|
|
local function say(s) table.insert(out, s) end
|
|
|
|
local ramps = {}
|
|
for _, d in ipairs(map:GetDescendants()) do
|
|
if d:IsA("BasePart") then
|
|
local name, idx = d.Name:match("^(PA%a+Slip)_Deck_(%d+)$")
|
|
if name then
|
|
ramps[name] = ramps[name] or {}
|
|
table.insert(ramps[name], { i = tonumber(idx), p = d })
|
|
end
|
|
end
|
|
end
|
|
|
|
local function nearestSample(p)
|
|
local bd, bi = math.huge, -1
|
|
for i = 1, #samples do
|
|
local s = samples[i]
|
|
local dd = (Vector3.new(p.X, 0, p.Z) - Vector3.new(s.pos.X, 0, s.pos.Z)).Magnitude
|
|
if dd < bd then bd, bi = dd, i end
|
|
end
|
|
return bi, bd
|
|
end
|
|
|
|
for _, name in ipairs({ "PAWestSlip", "PAEastSlip" }) do
|
|
local segs = ramps[name]
|
|
if not segs then say(name .. ": MISSING") continue end
|
|
table.sort(segs, function(x, y) return x.i < y.i end)
|
|
local first, last = segs[1].p, segs[#segs].p
|
|
local si = nearestSample(first.Position)
|
|
local ei = nearestSample(last.Position)
|
|
|
|
-- 3D path length along the ramp centreline.
|
|
local plen = 0
|
|
for k = 2, #segs do
|
|
plen += (segs[k].p.Position - segs[k - 1].p.Position).Magnitude
|
|
end
|
|
local drop = first.Position.Y - last.Position.Y
|
|
local flat = (Vector3.new(first.Position.X, 0, first.Position.Z)
|
|
- Vector3.new(last.Position.X, 0, last.Position.Z)).Magnitude
|
|
|
|
-- Sample spacing, to convert sample counts into studs.
|
|
local spacing = (samples[2].pos - samples[1].pos).Magnitude
|
|
local dsamples = math.abs(ei - si)
|
|
|
|
say(("=== %s ==="):format(name))
|
|
say((" segments: %d, seg length ~%.0f studs, path length %.0f studs")
|
|
:format(#segs, plen / math.max(1, #segs - 1), plen))
|
|
say((" mouth at sample %d -> end near sample %d (travels %d samples = %.0f studs ALONG the highway)")
|
|
:format(si, ei, dsamples, dsamples * spacing))
|
|
say((" vertical drop: %.1f studs horizontal run: %.0f studs grade: %.1f%%")
|
|
:format(drop, flat, 100 * drop / math.max(1, flat)))
|
|
say((" PARALLEL-ness: %.0f studs along-highway per %.0f studs of drop -> %s")
|
|
:format(dsamples * spacing, drop,
|
|
(dsamples * spacing) > drop * 4 and "runs alongside" or "DIVES OFF THE SIDE"))
|
|
end
|
|
|
|
-- What is underneath the ramp mid-span? (is it over water/air, or over the lot?)
|
|
local names = {}
|
|
for _, d in ipairs(ws:GetDescendants()) do
|
|
if d:IsA("BasePart") then
|
|
names[d.Name:gsub("_%d+$", "")] = true
|
|
end
|
|
end
|
|
local cats = {}
|
|
for k in pairs(names) do table.insert(cats, k) end
|
|
table.sort(cats)
|
|
say("part categories in world: " .. #cats)
|
|
say(" " .. table.concat(cats, ", "):sub(1, 900))
|
|
return table.concat(out, "\n")
|