TeamDman / SuperFactoryManager

Mozilla Public License 2.0
35 stars 15 forks source link

Round Robin implementation #102

Closed ilya-pirogov closed 2 months ago

ilya-pirogov commented 8 months ago

How I can do round robin distribution? I understand that I can write something like:

every 20 ticks do
    INPUT stone FROM in
    OUTPUT 10 TO EACH out
end

But if "in" is receiving less than 10*out items per second then all items goes into the first "out" only.

TeamDman commented 8 months ago

not yet implemented, but if you want to avoid stuffing one inventory when others are empty try

every 20 ticks do
  input stone from in
  output retain 1 to each out
end

which should ensure each inventory keeps at most 1 stone

TeamDman commented 2 months ago

added in 4.14.0, see example programs for usage