Mod description
This mod prevents inserters and mining-drills to drop items on the floor. See the picture, the inserter let iron-plate on the belt.
I didn't like to pick drop items so I've made this mod to change inserters and mining-drills behaviour.
An inserter (or mining-drill) without a proper target (chest, transport belt, assembling machine, furnace, ...) is deactivated. This happens when the inserter is built, rotated or when the existing target is removed.
An inserter (or mining-drill) with a proper target is activated when built, rotated or when a target is built.
https://forums.factorio.com/viewtopic.php?t=51514
Version history
Version 0.1.0
If an inserter is deactivated holding items, they are transfered to the player (if identified)
Version 0.1.1
Now works on every surface, not only nauvis.
Version 0.1.2
Rewrite a few functions to facilitate debugging.
Deactivate chained inserters handeling try of the last version.
Version 0.1.3
Fix problem with inserters used to fill-in locomotive
Inserters are now active when facing a rail
Version 0.1.4
Fix problem with bob's adjustable inserters : no status changed when drop position was changed
Version 0.1.5
Handle splitter and underground-belt
Version 0.1.6
Fix: Pumpjack no longer deactivated
Version 0.1.7
Fix: Chained burner-mining-drills are handled
Fix: Burner-inserters are handled
Version 0.1.8
Fix: Removing chest destination of a burner inserter made a crash
Other things
Known bug/funny behaviour
When an inserter is deactivated, it stays in its position (like when power goes down). Same thing when the inserter is rotated, so it's difficult to understand the actual direction of the inserter.
When an inserter is deactivated and is holding items, items are lost. This happens when the target chest is destroyed by alien or when a robot picked up the chest.
An inserters that drops item where another inserter picks them is still deactivated (chained inserters). Consider placing a small chest at the place for small buffer.
Adding this mod to an existing saved game won't change anything. Only newly built or rotated inserters will be handled.
When an Uranium mining drill is deactivated, it will stop transfer acid to adjacent mining drill.
Unknown bug/funny behaviour
I tested this mod on my game only, so I have no clue about its behaviour when circuit network is involved.
I don't know if it works on a server with multiple players.
No idea of the behaviour with other inserter-related mod.
if you are curious, feel free to test it and give feedback. Be aware that's my first mod and first step with Lua.