LuaItemStack.apply_stack_limit = false

Things that we aren't going to implement
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

LuaItemStack.apply_stack_limit = false

Post 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.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14601
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaItemStack.apply_stack_limit = false

Post 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.
If you want to get ahold of me I'm almost always on Discord.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: LuaItemStack.apply_stack_limit = false

Post 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?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Post Reply

Return to “Won't implement”