Bob's Flip and Turn


Blueprint Flip and Turn fork: fixes array-format inserter vectors and Factorio 2.0 directions.

Utilities
2 hours ago
2.0
0
Logistics Blueprints
Owner:
rainyzat
Source:
N/A
Homepage:
https://github.com/tst2005factorio/bo...
License:
MIT
Created:
2 hours ago
Latest Version:
1.0.0 (2 hours ago)
Factorio version:
2.0
Downloaded by:
0 users

Bob’s Flip and Turn

Flip blueprints horizontally or vertically while preserving custom inserter pickup and drop positions, including the extended reaches and offsets used with Bob’s Inserters.

Bob’s Flip and Turn is a compatibility fork of Blueprint Flip and Turn 200.8.6, updated to address a crash when flipping blueprints containing custom inserter vectors in Factorio 2.0.

What this fork fixes

The original mod assumes that inserter pickup and drop positions always contain named x and y fields. Factorio can return these vectors as two-element arrays instead. Trying to negate a missing coordinate causes a non-recoverable error:

control.lua:96: attempt to perform arithmetic on field 'x' (a nil value)

This fork handles both coordinate formats, allowing horizontal and vertical flips to preserve custom pickup and drop positions, long reaches, and fractional offsets.

It also adapts the original direction calculations to Factorio 2.0’s sixteen-direction system.

Features

  • Horizontal and vertical blueprint flipping.
  • Support for custom inserter pickup and drop vectors.
  • Compatibility with array and dictionary coordinate formats.
  • Corrected Factorio 2.0 direction calculations.
  • Retained splitter input and output priority swapping.
  • Original flip buttons and keyboard shortcuts.

Controls

  • Shift + Z: Flip horizontally.
  • Shift + X: Flip vertically.

Installation and compatibility

Requires Factorio 2.0. Bob’s Inserters is optional, although compatibility with its custom inserter configurations is the main purpose of this fork.

Disable the original Blueprint Flip and Turn before enabling Bob’s Flip and Turn. The two mods are marked as incompatible to prevent duplicate controls and event handling.

GUI Unifyer recognizes the original mod’s internal name. This fork uses its own top-of-screen buttons.

If a blueprint selected from the blueprint library cannot be edited, copy it into your inventory and flip that copy.

Validation

The original crash was reproduced using an array-format inserter drop position. The corrected mod passed 64 automated regression cases covering both flip directions, both coordinate formats, all sixteen directions, and restoration after flipping twice.

Additional checks covered keyboard shortcuts, vanilla inserters without custom vectors, splitter priorities, and Lua compilation. Live gameplay validation is still pending.

Authors and coauthor credits

Original mod author: NovaM.

Original authors and contributors credited by Blueprint Flip and Turn: Marty & GopherAtl, Roktaal, and Humpfry.

Fork development assistance and coauthor credit: OpenAI Codex — crash investigation, compatibility changes, packaging, and automated regression checks.

This fork builds on the original authors’ work. These credits acknowledge their contributions; they do not imply that the original authors maintain or endorse this fork.

License

Blueprint Flip and Turn is listed under the MIT License on its official Factorio mod page. Redistribution of this fork must retain the applicable original copyright notice and MIT license text.

Original project: https://github.com/tst2005factorio/blueprint_flip_and_turn
Original mod page: https://mods.factorio.com/mod/blueprint_flip_and_turn