[0.17.64] on_built_entity always has item_requests = nil

Bugs that are actually features.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

[0.17.64] on_built_entity always has item_requests = nil

Post by Optera »

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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14318
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.64] on_built_entity always has item_requests = nil

Post by Rseding91 »

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.
Capture.PNG
Capture.PNG (464.04 KiB) Viewed 1040 times
If you want to get ahold of me I'm almost always on Discord.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [0.17.64] on_built_entity always has item_requests = nil

Post by Optera »

In that case the bug changes to a missing API event for creation of item-request-proxy.
Post Reply

Return to “Not a bug”