Swap Rail Layer in Blueprint

by majoca

Press G while holding a blueprint (or after using copy/cut) to swap all rails between ground/elevated layers.

Utilities
22 days ago
2.0
83
Factorio: Space Age Icon Space Age Mod
Trains Blueprints
Owner:
majoca
Source:
https://github.com/Majoca22/swap-rail-layer
Homepage:
N/A
License:
MIT
Created:
25 days ago
Latest Version:
1.1.0 (22 days ago)
Factorio version:
2.0
Downloaded by:
83 users

While holding a rail blueprint, press G to swap all rails between the ground and elevated layers. That's pretty much it.

(The hotkey is the same as whatever you use to switch rail layers while using the rail planner.)

Demonstrations



Limitations

The mod does its best to determine where rail supports are needed in order to build the new elevated rails. This isn't a trivial problem to solve, so very complex blueprints might lag or fail to find a valid solution. This can be refined in the future, but currently the mod handles a wide variety of situations quite well.

Scripts are not able to modify the contents of blueprints in the cross-save blueprint library. However, the mod will work if you are holding a blueprint from the "game blueprints" library, or a blueprint stored in your inventory, or a copy/cut selection. Overwriting the contents of a blueprint in the "game blueprints" library requires an opt-in via per-player settings.