[Not-implemented] item_requests for non-ghost entities

Things that we aren't going to implement
Post Reply
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1194
Joined: Wed May 18, 2016 4:55 pm
Contact:

[Not-implemented] item_requests for non-ghost entities

Post by Mooncat »

Request:
make LuaEntity::item_requests accessible for non-ghost entities that have inventory, so we can know what items will be delivered and what are still missing (or how many slots will still be available)

(Even though we can already do this by finding item-request-proxy on the entity, but it is complicated and using find_entity for such purpose doesn't sound right.)
(And it is even worse that LuaSurface::find_entity cannot find item-request-proxy. We have to use find_entities instead.)
Last edited by Mooncat on Wed Jun 07, 2017 2:06 am, edited 1 time in total.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13232
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: item_requests for non-ghost entities

Post by Rseding91 »

item_requests don't exist for non-ghost entiites. It's not a matter of enabling the property.

Additionally if there is an item-request-proxy attached to the entity it doesn't know about it - entity-search is the proper way to detect and find if one exists as that's exactly what the game would do to check if one existed.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1194
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: item_requests for non-ghost entities

Post by Mooncat »

Since we have proxy_target now, I thought it shouldn't be difficult to link the target entity to the proxies in reverse way...
That way you can also remove the proxies easily if the target entity is removed (mined, destroyed, etc).
But not a big deal, thanks.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13232
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: item_requests for non-ghost entities

Post by Rseding91 »

The way the proxy works the entity doesn't know it exists at all and as such doesn't need to save/load any additional data.

Additionally when the target of a proxy is destroyed it destroys itself the same or next tick so you don't have to worry about removing it.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1194
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: item_requests for non-ghost entities

Post by Mooncat »

I think I understand it. Thanks. :)

Post Reply

Return to “Won't implement”