Burner Leech


Burner Inserters can take fuel from any entity (ie. furnaces)

Utilities
4 months ago
0.17 - 1.1
417

g global.burner_index

4 years ago

Why is burner_index stored in global btw?
It looks like its the current index while iterating over the loop or have I missed something?

4 years ago

Because it only processes 1 burner per tick.
I needed to store that index somewhere.

This was the most elegant solution that I've found.
If you have a better way, pleas do let me know.

4 years ago

Oh I hadn't appreciated the 1 burner per tick aspect. Thanks for explaining πŸ˜€

4 years ago

in general this is very nice and works well, and in vanilla factorio there shouldn't be a problem with "only" maybe a hundred burner inserters (that would take 1-2 seconds to check them all). but i now play the Fantorio mod which has a hugely extended burner phase (at least to space science) and thus there are LOTS of burner inserters and will be even more. with 600 to 6000 (or more) inserters, it will take 10-100 (or more) seconds to check them all and some certainly will run out of fuel in the meantime.

without thinking about details, i see two relatively easy solutions to this problem: either have a mod option, how many inserters are handled per tick (this would have to be adjusted by the user when building more inserters :-( ), or have a queue of eg 60 lists (again, maybe an option how many lists), handling one such list per tick (for vanilla some might be empty, for my game some might have 10, 100 or 1000 entries). the result would be that the mod might use more time per tick and cost some UPS when there are more inserters, but that it never will use crazy long times between checks and maybe even fail completely when an inserter has run out of fuel.

4 years ago

This is a fair argument.
I'll consider it in an upcoming release

4 years ago

This should be resolved when 0.17.69 of base is released.

Klonan added C++ side code to handle fuel leeching.

New response