[0.16.16] create_entity for item-request-proxy incorrect

Bugs that are actually features.
Post Reply
User avatar
Dustine
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Tue Mar 31, 2015 4:52 pm
Contact:

[0.16.16] create_entity for item-request-proxy incorrect

Post by Dustine »

The documentation right now says that, when you use LuaSurface.create_entity for item-request-proxy you must do:
item-request-proxy
  • modules :: dictionary string → uint: The stacks of items to be delivered to target entity from logistic network. Each stack must be table. If empty, the item request proxy won't be created.
Only that's incorrect, using this syntax gives an error, and instead modules seems to take a table of {item = "name", count = 1}, as in an array of SimpleItemStack. Only that's not quite correct either, as if that was the case, it should be name and not item for the simple stack's name.

In short, documentation is wrong, and it should probably be modules[...].name, not modules[...].item as it is currently.

(ty Mylon for finding the correct syntax for modules)
Image

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [0.16.16] create_entity for item-request-proxy incorrect

Post by Nexela »

I propose 2 changes for this

modules -> requests -- because you can request anything not just modules
item -> name -- for consistency with simplestack

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

Re: [0.16.16] create_entity for item-request-proxy incorrect

Post by Rseding91 »

Only that's incorrect, using this syntax gives an error, and instead modules seems to take a table of {item = "name", count = 1}, as in an array of SimpleItemStack.
That's the legacy format.

The correct one - the one that you'll get back when reading it off an existing item request proxy - is what the docs show.

https://i.imgur.com/KtQ1cnW.jpg
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Not a bug”