Allow entities to prevent automatic targeting behavior of inserters while allowing explicit assignment by script

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
noodlebox
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Oct 09, 2017 3:01 am
Contact:

Allow entities to prevent automatic targeting behavior of inserters while allowing explicit assignment by script

Post by noodlebox »

This is a request to restore the functionality of the bug feature present in 2.0.43 and earlier as described here: viewtopic.php?t=128081
In 2.0.43 and earlier, the "no-automated-item-removal" entity prototype flag prevents inserters from automatically selecting an entity as a target for pickup, while allowing their manual assignment via the api using pickup_target. This is useful, as it allows a mod to easily control access to an entity, protecting it against unintended interaction that is not explicitly assigned.
This is a useful behavior (even if not originally intended) and could be exposed instead using a different flag, such as "not-automated-pickup-target" and "not-automatic-drop-target". As before, this kind of soft-restriction also allows mods to behave in a cooperative way to allow safe interaction with other modded entities with less risk of conflict.

For example, a modded entity using a "container"-like prototype for some internal usage (as in a composite entity) where "no-automated-item-removal" would prevent its functionality entirely, but external interaction might have strange or undesirable consequences. Another mod with some functionality that searches for and interacts with container-like entities in an analogous way would be able to detect the presence of this flag and respect it, avoiding those unintended consequences.
protocol_1903
Filter Inserter
Filter Inserter
Posts: 272
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Allow entities to prevent automatic targeting behavior of inserters while allowing explicit assignment by script

Post by protocol_1903 »

+1, it makes sense to override targeting behavior, even to non-(automatically)-assignable entities. Perhaps this should apply to loaders as well?
If you need to reach me, message me on discord.

I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
User avatar
Quezler
Fast Inserter
Fast Inserter
Posts: 228
Joined: Fri Mar 25, 2016 6:37 pm
Contact:

Re: Allow entities to prevent automatic targeting behavior of inserters while allowing explicit assignment by script

Post by Quezler »

+1, in quite a handful of my mods i rely on this behavior for compound entities, having invisible entities being able to interact with eachother by forcing the pickup/dropoff through script whilst preventing any nearby player placed entities from automatically connecting is vital, the new behavior is damaging.
Post Reply

Return to “Modding interface requests”