udf / factorio-auto-resource-redux

A factorio mod that automates most logistics so you can focus on combat
MIT License
3 stars 3 forks source link

Auto-config requester-tank #10

Open bengardner opened 2 months ago

bengardner commented 2 months ago

Try to autoconfig from the periodic task and when the GUI opens.

udf commented 2 months ago

Very cool feature! Not sure if I like it always running when there is no fluid set, though. It probably doesn't matter because you can switch the fluid instead of clearing it. There might be some confusion with clearing the fluid request, because the auto config doesn't update the GUI, so it'll be requesting fluid while the GUI says it's not (until you reopen the GUI, of course).

bengardner commented 2 months ago

In my fork of Item Network, I initially used a different state when a requester tank was in 'auto' mode. ('give', 'take', 'auto') There was a single tank that did both the source and sink functions. I eventually split that into two tanks, as is done in this mod.

I also had a variable rate service queue, so that 'auto' requester-tanks would only check once per ~10 seconds. I also had triggers tied to the closing of a entity GUI to service the tank sooner.

I haven't pinned down how often the tanks are serviced. But, yeah, checking several times a second would be wasteful.