1. What did you do?
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. Mods that implement entity logic with the intention of behaving consistently with the base game can easily check for and respect the presence of this flag when selecting other entities to interact with, especially when those potential targets are controlled by other mods whose functionality may be disrupted.
2. What happened?
The fix to the edge case described in viewtopic.php?t=127774, implemented for 2.0.44, seems to be use of this same entity prototype flag, "no-automated-item-removal" to determine whether an entity is "a valid pickup target" at all. This breaks the use case mentioned above, as the only supported behaviors now are "no access" or "open access", requiring additional event handling to check for and prevent unintended access where before it was trivially guaranteed by the engine.
3. What did you expect to happen instead? It might be obvious to you, but do it anyway!
My expectation was for the existing functionality of that flag to remain intact (as it still is with "no-automated-item-insertion"), especially as the primary argument towards the behavior in the earlier bug report being incorrect was that it imposed an additional burden of event handling on modded entities, simply for intending to maintain a consistently correct state while potentially interacting with entities outside the mod's control. The prior behavior of this flag was a very useful tool to that same end.
I would also understand if this kind of usage were never intended at all, in which case I will re-open this as a modding interface request instead. I do appreciate the fix to the other issue and I'm sorry to bring up inserter behavior again already. I am relatively new to using the API and I'm sure I'll stop fussing so much over edge cases eventually!
I've attached a minimal example mod and save file (using the EditorExtensions mod) to demonstrate the difference in behavior between 2.0.43 and 2.0.44. Remove and replace the inserters using the provided blueprint.
[2.0.44] Regression: "no-automated-item-removal" no longer allows entities to be assigned as pickup_target by script
[2.0.44] Regression: "no-automated-item-removal" no longer allows entities to be assigned as pickup_target by script
- Attachments
-
- Fast Inserters on the left, "Privileged Inserters" on the right
- Screenshot from 2025-04-09 06-28-50.png (291.01 KiB) Viewed 248 times
-
- 2.0.44 Behavior
- Screenshot from 2025-04-09 06-29-00.png (314.48 KiB) Viewed 248 times
-
- 2.0.43 Behavior
- Screenshot from 2025-04-09 06-30-34.png (352.38 KiB) Viewed 248 times
-
- demo-inserter-control-example.zip
- Demo save file
- (498.34 KiB) Downloaded 18 times
-
- demo-inserter-control_0.0.0.zip
- Demo mod
- (1.6 KiB) Downloaded 15 times
Re: [2.0.44] Regression: "no-automated-item-removal" no longer allows entities to be assigned as pickup_target by script
Your expectation was built on top of a bug. What you are asking for is to restore a bug.https://www.hyrumslaw.com/ wrote:With a sufficient number of users of an API,
it does not matter what you promise in the contract:
all observable behaviors of your system
will be depended on by somebody.
Not a bug.
Ability to assign pickup_target is primarily so that if inserter has multiple choices, you can reattach inserter to use a specific target. It still needs to be able to attach to a given target so it must be a valid pickup target. If you mark entity as "no automated item removal" then you are saying no inserter should be taking items out of it so by asking inserter to take items out of it, the inserter correctly refuses.
Re: [2.0.44] Regression: "no-automated-item-removal" no longer allows entities to be assigned as pickup_target by script
Haha, that is fair. The documentation of those flags already seemed to suggest as much. Thanks!
Edit, reopened as modding interface request: viewtopic.php?t=128082
Edit, reopened as modding interface request: viewtopic.php?t=128082