Integrated Circuitry

by judos

Status bars, compact-combinators to hide your gigantic circuitry inside a 2x2 entity with has 12 io-ports, circuit-poles, optimized lamps for displays. (All UPS friendly)

Content
4 years ago
0.15 - 0.18
53
Circuit network

i allow setting min/max count via external signal

3 years ago

I'd like to use a status panel to track robot use levels in my logistic networks. As you know the total number of robots can vary over time, especially if I automate creating new robots when the available count stays low for long enough. (The display is just for my own entertainment, TBH.)

Anyway, since any roboport can export both the active and total robot counts it'd be super-convenient to be able to set the min/max count externally. It wouldn't need to be super-fast -- not "every tick" or anything -- so polling for it shouldn't be /too/ costly, I'd hope. Pity there isn't an event for "signal value changed" :)

PS: might be worth using https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.get_merged_signal to get the sum of signal values on circuit wires. IIRC getting signal data was very expensive for some reason, and that was added to speed it up some. I think it is the same thing as the current code, but one function call instead of two and your own adding up. :)

3 years ago

Yes, please.

New response