Configurable Valves GUI

by latotty

Adds a panel to the Configurable Valves window: pick overflow, top up or one way, and set the threshold with a slider or a number. It writes the same circuit condition as the valve's hotkeys, so blueprints and copy-paste keep working.

Utilities
a day ago
2.1
6
Logistics Fluids Circuit network
Owner:
latotty
Source:
https://github.com/latotty/factorio-m...
Homepage:
https://github.com/latotty/factorio-mods
License:
MIT
Created:
a day ago
Latest Version:
1.0.0 (a day ago)
Factorio version:
2.1
Downloaded by:
6 users

Configurable Valves GUI (llwz-configurable-valves-gui)

Made for our own play experience. I don't promise to maintain it. Feel free to fork, reuse or rewrite it (license: MIT).

A panel beside the Configurable Valves window (by stringweasel): a mode drop-down (overflow, top up, one way) and a 0–100% threshold slider with a number field.

A Configurable Valves valve is a pump whose circuit condition is its setting: overflow I > x, top up O < x, one way I > O. The panel only reads and writes that condition, so blueprints, copy-paste, undo, the valve's hotkeys and the plain condition editor keep working. A hand-written condition shows as "Custom condition" until a mode is picked.

  • Valve names come from the valve mod's mod-configurable-valves mod data, so valves other mods register there work too.
  • No per-tick work while no valve window is open; while one is, the panel re-reads the condition every 15 ticks to follow changes made elsewhere.

Build and test

  • The mod zip is this folder as llwz-configurable-valves-gui_<version>/, without build/, test/ and this README.
  • test/run.lua runs the control script against stubbed Factorio APIs and simulates the GUI events: lua5.2 test/run.lua from this folder.