Page 2 of 2

Re: Fast reading for inventory slots

Posted: Wed Feb 12, 2020 2:26 pm
by Oktokolo
Rseding91 wrote: Wed Feb 12, 2020 8:21 am get_insertable_count()
Wow. Thanks. Now i have an excuse to further delay updating that mod until next Factorio update.

Re: Fast reading for inventory slots

Posted: Wed Apr 22, 2020 12:26 am
by Honktown
Bumping since this idea/request is still related:

A way to get an array of LuaSimpleItemStacks from an inventory. Constant Combinators for example have ConstantCombinatorParameters, which returns a table of signal, count, and index. For an inventory there's no similar table (item, count, and index) but it would be a lot lighter than providing a full LuaItemStack for every slot.

Re: Fast reading for inventory slots

Posted: Wed Apr 22, 2020 5:11 am
by Rseding91
Honktown wrote: Wed Apr 22, 2020 12:26 am Bumping since this idea/request is still related:

A way to get an array of LuaSimpleItemStacks from an inventory. Constant Combinators for example have ConstantCombinatorParameters, which returns a table of signal, count, and index. For an inventory there's no similar table (item, count, and index) but it would be a lot lighter than providing a full LuaItemStack for every slot.
Lua just sucks. It's never going to be fast.