Page 1 of 1
[MOD 0.17.x] Inserter Fuel Leech
Posted: Thu Feb 01, 2018 10:54 am
by Oktokolo
Inserter Fuel Leech (
GitHub) makes all inserters take ("leech") fuel from the fuel inventories of entities at their pickup position. They do that whenever their hand is hovering over the pickup location and they or their drop target need refuelling.
Works with vanilla and modded inserters. Does not add or modify prototypes.
Inserters leech from anything that has a burner. They do not leech if they or their drop target do not need fuel.
If you want to use burner inserters for anything else than smelter input, cascade burner tech (example: ore to steel), or want to be able to leech fuel from vehicles into burner tech - this mod is for you.
Re: [MOD 0.16.x] Inserter Fuel Leech
Posted: Fri Jun 01, 2018 9:45 am
by Aphelius
I feel like this should be vanilla, at least for black inserters. The ability to build massive low tech power free smelters is really nice. As of now burner inserters serve almost no purpose,which is bad design imo.
Re: [MOD 0.16.x] Inserter Fuel Leech
Posted: Sun Sep 15, 2019 3:07 pm
by darkfrei
Aphelius wrote: Fri Jun 01, 2018 9:45 am
I feel like this should be vanilla, at least for black inserters. The ability to build massive low tech power free smelters is really nice. As of now burner inserters serve almost no purpose,which is bad design imo.
It's another one "vanilla, but disabled" feature.
Re: [MOD 0.16.x] Inserter Fuel Leech
Posted: Sun Sep 15, 2019 5:40 pm
by Klonan
darkfrei wrote: Sun Sep 15, 2019 3:07 pm
Aphelius wrote: Fri Jun 01, 2018 9:45 am
I feel like this should be vanilla, at least for black inserters. The ability to build massive low tech power free smelters is really nice. As of now burner inserters serve almost no purpose,which is bad design imo.
It's another one "vanilla, but disabled" feature.
Well the logic was just added, and isn't even released yet...
Re: [MOD 0.16.x] Inserter Fuel Leech
Posted: Sun Sep 15, 2019 7:00 pm
by darkfrei
Klonan wrote: Sun Sep 15, 2019 5:40 pm
Well the logic was just added, and isn't even released yet...
And the burnt_result_inventory is still unavailable for all inserters?
Re: [MOD 0.16.x] Inserter Fuel Leech
Posted: Mon Sep 16, 2019 3:24 pm
by Oktokolo
Klonan wrote: Sun Sep 15, 2019 5:40 pm
darkfrei wrote: Sun Sep 15, 2019 3:07 pm
It's another one "vanilla, but disabled" feature.
Well the logic was just added, and isn't even released yet...
Nice. Will happily replace the on-tick teleport logic with that single flag.
Having an additional leech-enable flag for recipe ingredients would also be nice.
Implementing recipe ingredient leeching is the feature i planned to implement next and it would come with the same UPS implications and uglyness like the current fuel leeching.
Re: [MOD 0.17.x] Inserter Fuel Leech
Posted: Mon Apr 27, 2020 7:57 am
by Roady
Got this error loading a save today.
Playing with full Angel, Bob, Clowns and Omni.
Re: [MOD 0.17.x] Inserter Fuel Leech
Posted: Mon Apr 27, 2020 2:51 pm
by Oktokolo
Roady wrote: Mon Apr 27, 2020 7:57 am
Got this error loading a save today.
Playing with full Angel, Bob, Clowns and Omni.
There seems to exeist an item without a fuel value that is still accepted by a burner inventory. That should never happen (and in vanilla it doesn't happen).
One of the mods probably added such an item. I will add a check for items to actually have a fuel value to my mod soon (TM).
Re: [MOD 0.17.x] Inserter Fuel Leech
Posted: Sun May 03, 2020 10:51 pm
by Oktokolo
Roady wrote: Mon Apr 27, 2020 7:57 am
Got this error loading a save today.
Playing with full Angel, Bob, Clowns and Omni.
I added a check to ensure a fuel value greater than zero. This should prevent the fuel cheat from trying to feed the inserters with an item wich's prototype is defined to be in the accepted fuel category but having no fuel value.
If you by now know the mod defining that prototype, it would be nice to inform that author too. An item prototype having a fuel category but no fuel value makes no sense, so it probably isn't meant to be that way...
Re: [MOD 0.17.x] Inserter Fuel Leech
Posted: Mon May 04, 2020 6:52 am
by darkfrei
There is another same mod
Burner-Leech that uses vanilla-side logic, that can be enabled just with:
Code: Select all
for i, v in pairs (data.raw.inserter) do
if v.energy_source and v.energy_source.type == "burner" then
v.allow_burner_leech = true
end
end
Works it better with such zero fuel values?
Re: [MOD 0.17.x] Inserter Fuel Leech
Posted: Tue May 05, 2020 3:25 am
by Oktokolo
darkfrei wrote: Mon May 04, 2020 6:52 am
There is another same mod
Burner-Leech that uses vanilla-side logic, that can be enabled just with:
The vanilla-side logic is enabled in my mod too.
The issue occured in the refuel-cheat logic, wich regularly feeds made-up items having a tiny amount of power to burner inserters wich are out of power to enable them to sloooowly grab themselves some real fuel.
The prototype of that item is automatically determined by iterating over all prototypes having a fuel category supported by the inserter's burner. The fix was to add fuel_value > 0 to the filter.
Re: [MOD 0.17.x] Inserter Fuel Leech
Posted: Thu Jan 23, 2025 12:52 pm
by Oktokolo
Just in case, anyone was still waiting for the 2.0 update. It is available now.
Inserter Fuel Leech 1.0.0 is a complete rewrite for less UPS impact.
There are now settings for when you need to exclude non-burner inserters (probably to further save UPS) or only want to enable the vanilla burner fuel leeching mechanic (for potato PCs and megabasers).
The mod can be added or removed to/from a running game at any time.
It is fully Space Age and multiplayer compatible (but doesn't require Space Age).
The cheat refuel logic doesn't generate energy from thin air anymore, but just teleports a fuel item from the hand, pickup, or dropoff into the inserter's burner.
The cheat refueling should also trigger less now, as the hand position prediction and update scheduling has been improved.
There is also support for inserters leeching fuel from their drop target now. It's unreliable, but the cheat refuel logic catches the cases where the inserter hand is never over the drop target when the code looks at it. Drop target fuel leeching is feasible for low-traffic applications.