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.)
[Not-implemented] item_requests for non-ghost entities
[Not-implemented] item_requests for non-ghost entities
Last edited by Mooncat on Wed Jun 07, 2017 2:06 am, edited 1 time in total.
Re: item_requests for non-ghost entities
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.
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.
Re: item_requests for non-ghost entities
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.
That way you can also remove the proxies easily if the target entity is removed (mined, destroyed, etc).
But not a big deal, thanks.
Re: item_requests for non-ghost entities
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.
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.
Re: item_requests for non-ghost entities
I think I understand it. Thanks.