Page 1 of 1

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

Posted: Wed Apr 09, 2025 11:39 am
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.

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

Posted: Fri Apr 11, 2025 4:49 pm
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?

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

Posted: Sat Apr 12, 2025 12:29 pm
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.