Problem:
When building an entity containing modules the entity returned by on_built_entity and on_robot_built_entity have item_requests = nil.
Reproduce:
Create a ghost with modules.
Build only the entity.
The entity returned in the build events does not contain item_requests.
Later in tick handler the entity again has item_requests set.
Expected:
Entity returned by build events contains the same item_requests as the ghost.
[0.17.64] on_built_entity always has item_requests = nil
Re: [0.17.64] on_built_entity always has item_requests = nil
Thanks for the report however what you describe never worked that way and doesn't actually work as you describe.
item_requests only works on ghosts and item request proxies. A normal entity will never have any value for that property. Robots do not build ghosts so there is never an event fired by a robot that would ever possibly have item_requests set. https://lua-api.factorio.com/latest/Lua ... m_requests
The only time item_requests would be set is when building ghosts through a blueprint and in that case the entity during on_built_entity *does* contain item_requests.
item_requests only works on ghosts and item request proxies. A normal entity will never have any value for that property. Robots do not build ghosts so there is never an event fired by a robot that would ever possibly have item_requests set. https://lua-api.factorio.com/latest/Lua ... m_requests
The only time item_requests would be set is when building ghosts through a blueprint and in that case the entity during on_built_entity *does* contain item_requests.
If you want to get ahold of me I'm almost always on Discord.
Re: [0.17.64] on_built_entity always has item_requests = nil
In that case the bug changes to a missing API event for creation of item-request-proxy.
My Mods: mods.factorio.com