-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Summary
When scaling production buildings (Constructors, Assemblers, Manufacturers, etc.), Smart! could automatically generate the complete manifold infrastructure needed to support them - splitters/mergers, belts, power poles, and wiring - with all settings (recipe, clock speed, shards, sloops) copied to each child.
Origin
This concept emerged from donor feedback analysis. Users want a "zero-brain" experience where scaling a production building results in a fully-connected, ready-to-use manifold setup without manual wiring.
Proposed Behavior
When enabled via config setting, scaling a production building would:
- Auto-spawn splitters/mergers - One per input/output, positioned to form a manifold
- Auto-spawn belts - Connect each machine to its splitter/merger
- Auto-spawn power poles - Shared or per-machine power infrastructure
- Auto-wire power - Connect all machines to the power grid
- Copy settings - Recipe, clock speed, shards, sloops applied to all children
- Chain manifold lanes - Connect distributors to form proper input/output manifolds
How This Differs from Existing Features
| Feature | What It Does | Limitation |
|---|---|---|
| Scaling (current) | Spawns N copies of a building in a grid | No logistics, no power, no connections |
| Auto-Connect (current) | Connects distributors to nearby buildings | Only works for distributors, not factories |
| EXTEND (current) | Clones existing infrastructure | Requires existing infrastructure to clone |
| Smart Scaling (proposed) | Generates complete manifold infrastructure | Solves the "kickstart" problem |
Existing Code to Leverage
- Distributor spawning:
SFManifoldJSON.cppalready spawns splitters/mergers as children - Belt spawning:
SFConveyorBeltHologramhandles belt child holograms - Power wiring:
SFPowerAutoConnectManagermanages power connections - Recipe copying:
SFRecipeManagementServicecopies recipes to children - Building size lookup:
SFBuildableSizeRegistryknows dimensions for spacing - Connector discovery:
SFAutoConnectServicefinds compatible connectors
Open Questions
- Where should distributors be placed? (Behind machine? To the side? Configurable?)
- Belt tier selection? (Config setting? Auto-detect from recipe throughput?)
- Power pole placement strategy? (One per machine? Shared pole for row?)
- Pipe support? (Same logic for junctions + pipelines for fluid machines?)
- Visual preview of manifold before building?
Dependencies
This feature sits on top of the Scaling system and should be implemented after the Scaling Refactor (#225) is complete. The refactor addresses fundamental issues with how Scaling uses "lock" children holograms, which would affect how Smart Scaling spawns and manages its additional child holograms.
Blocked by:
- Scaling Refactor #225 - Scaling Refactor (cleaner architecture needed first)
Related issues:
- Critical UI Widget Memory Leak - UObject Limit Exceeded #147 - Critical UI Widget Memory Leak (scaling-related memory issues)
- Address InfiniteNudge Incompatibility #163 - InfiniteNudge Incompatibility (scaling modifier conflicts)
- Power Shard support for scaling recipe copying #209 - Power Shard support for scaling recipe copying
- Somersloop support for scaling recipe copying #208 - Somersloop support for scaling recipe copying
- Auto-connect to also connect power to machines #167 - Auto-connect to also connect power to machines
Priority
Medium - This is a significant quality-of-life enhancement but requires foundational work first.
Labels
enhancement, scaling, future-feature