Skip to content

mapdata: scope pipe bottlenecks to the line, not the whole network - #10

Merged
valentinps merged 1 commit into
mainfrom
pipe-line-bottleneck
Jul 25, 2026
Merged

mapdata: scope pipe bottlenecks to the line, not the whole network#10
valentinps merged 1 commit into
mainfrom
pipe-line-bottleneck

Conversation

@valentinps

Copy link
Copy Markdown
Owner

Summary

Fixes a false bottleneck warning: a Mk2 pipe (600/min) feeding two Mk1 pipes (300/min) through a junction warned that the Mk1s slow the "network" down. The detector ranked every member of the FGPipeNetwork, which spans junctions -- belts never had this problem because the game's conveyor chain actors end at splitters/mergers.

Pipe bottlenecks are now scoped to the hovered segment's line: the walk follows mConnectedComponent links through rated pipes/pumps and through junctions acting as plain couplings (<=2 connected ports), and stops at junctions that actually split/merge flow (>=3 connected ports) and at anything unrated (machines, valves, tanks).

Also checked per the report: belt chains end at every splitter, even 1-in/1-out ones (437 checked) -- that's the game's own chain model, so belts are untouched.

Test plan

  • Reported rig (All_250726-180608.sav): 3-port junction with Mk2 + 2x Mk1 -- no warning on any side
  • solo_autosave_1.sav: 5,855 rated segments -- only the 4 genuine in-line mixes (Mk1 pump inside a Mk2 run) still warn; 2-port pass-through junctions keep the line going
  • cargo test -p sav_core --release all green

🤖 Generated with Claude Code

A Mk2 trunk feeding two Mk1 branches through a junction warned about a
bottleneck: the detector ranked every rated member of the FGPipeNetwork,
which spans junctions. Belts never had this problem because the game's
conveyor chain actors end at splitters/mergers (verified: at every
splitter, even 1-in/1-out ones).

Pipes now walk mConnectedComponent links outward from the hovered segment
instead: through rated pipes/pumps and through junctions acting as plain
couplings (<= 2 connected ports), stopping at junctions that actually
split or merge flow (>= 3 connected ports) and at anything unrated
(machines, valves, tanks). Scope string becomes "line" (the tooltip
already words non-network scopes that way).

Verified on the report's save (3-port junction rig: no warning on any
side) and solo_autosave_1 (5,855 rated segments: only the 4 genuine
in-line Mk1-pump-in-Mk2-run mixes still warn; 2-port pass-through
junctions keep the line going).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
satisfactorymap 658e57b Jul 25 2026, 04:34 PM

@valentinps
valentinps merged commit ffd5c04 into main Jul 25, 2026
3 checks passed
@valentinps
valentinps deleted the pipe-line-bottleneck branch July 28, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant