Page 1 of 1
LuaItemStack.apply_stack_limit = false
Posted: Mon Oct 08, 2018 8:19 am
by eradicator
What?
The ability to disable enforcing of the maximum stack size on any LuaItemStack. (I.e. the same way assembling machines can "overstack" the in/output slots.)
Why?
While there are interesting concepts (like nicer
compression chests), i'm mostly interested if this is technically feasible at all.
Re: LuaItemStack.apply_stack_limit = false
Posted: Mon Oct 08, 2018 9:38 pm
by Rseding91
The way inventories are built in Factorio you can't turn on or off stack limits without the game knowing ahead of time that the entity and inventory want to do that. So, while it could be implemented it would mean additional overhead every time any item is added or removed from that entity even when the base game isn't using it. For that reason we only have the logic in place for crafting machines and artillery.
The basic container entity is built to be as fast as possible. Since 100% of the base-game use doesn't use any of the "ignore stack size" logic it was never added to the container entity and likely won't be added for performance reasons.
Re: LuaItemStack.apply_stack_limit = false
Posted: Tue Oct 09, 2018 8:37 am
by eradicator
Thanks for the detailed answer.
If there was a special container prototype (i.e. "one slot container") that has only a single "unlimited" slot, could that be faster than a standard container? I.e. for situations in which the container has a very high i/o activity from many inserters/bots?