Page 1 of 1

[0.16.16] create_entity for item-request-proxy incorrect

Posted: Sun Jan 14, 2018 2:37 pm
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

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

Posted: Sun Jan 14, 2018 7:23 pm
by Nexela
I propose 2 changes for this

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

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

Posted: Sun Jan 14, 2018 11:11 pm
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