Page 1 of 1

LuaEntity.copy_settings returns objects ?

Posted: Sat Jul 30, 2016 10:13 am
by binbinhfr
Hi,

in http://lua-api.factorio.com/0.13.11/Lua ... y_settings
it is specified that the function returns objects
Return value : Any items removed from this entity as a result of copying the settings.
I wonder what kind of objects it can return, because it seems that this function does not copy modules (which I can understand).

But, it seems that it does not copy circuit settings either, which could nice, no ?

Infact it copies filters, requests, hash bar.

Re: LuaEntity.copy_settings returns objects ?

Posted: Sat Jul 30, 2016 10:22 am
by Klonan
binbinhfr wrote:Hi,

in http://lua-api.factorio.com/0.13.11/Lua ... y_settings
it is specified that the function returns objects
Return value : Any items removed from this entity as a result of copying the settings.
I wonder what kind of objects it can return, because it seems that this function does not copy modules (which I can understand).

But, it seems that it does not copy circuit settings either, which could nice, no ?

Infact it copies filters, requests, hash bar.

If you copy a recipe onto an assembling machine for instance, and it has items inside already, it will return those to you

Re: LuaEntity.copy_settings returns objects ?

Posted: Sat Jul 30, 2016 11:38 am
by binbinhfr
Ok, thx Klonan.

To precise the documentation, the return is a dictionary of counts indexed by name of items.
(and not a list of ItemStacks or whatever)

By the way, do you have an idea on this one :
viewtopic.php?f=34&t=30150