Page 1 of 1

LuaSurface.regenerate_entity optional entities argument

Posted: Tue Jan 08, 2019 10:51 pm
by Muppet9010
https://lua-api.factorio.com/latest/Lua ... ate_entity

At present, there isn't an easy way to regenerate all entities on a list of chunks. There is only an all entities default argument when the chunks argument is also not supplied.

Could an option for passing in an empty placeholder (nil or "" or {}) for the entities argument be added for use with a provided chunk or list of chunks.

Re: LuaSurface.regenerate_entity optional entities argument

Posted: Wed Jan 09, 2019 7:52 pm
by Rseding91
Seems reasonable. I think having "nil" mean "auto" would be best since an empty list isn't explicit enough that you want "all" (you could just as easily make a table, then populate it with 'everything that matches X criteria' and have it end up empty).