Allow filtered inserters to have more than 5 filters

Things that we aren't going to implement
Post Reply
User avatar
bigyihsuan
Filter Inserter
Filter Inserter
Posts: 299
Joined: Thu Jan 01, 2015 12:57 pm
Contact:

Allow filtered inserters to have more than 5 filters

Post by bigyihsuan »

I attempted to increase the number of filter slots from 5 to 10 today and got an error saying that the limit to filters on a filter inserter is 5.

You should be able to set the filter count of a filter inserter to any positive integer.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13210
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow filtered inserters to have more than 5 filters

Post by Rseding91 »

We store the filters as an array (compile time size) which is why you can't have more than 5.

It's done this way for performance reasons.
If you want to get ahold of me I'm almost always on Discord.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Allow filtered inserters to have more than 5 filters

Post by darkfrei »

Rseding91 wrote:We store the filters as an array (compile time size) which is why you can't have more than 5.

It's done this way for performance reasons.
And negative filter? It takes all, but not the specified.

User avatar
bigyihsuan
Filter Inserter
Filter Inserter
Posts: 299
Joined: Thu Jan 01, 2015 12:57 pm
Contact:

Re: Allow filtered inserters to have more than 5 filters

Post by bigyihsuan »

darkfrei wrote:
Rseding91 wrote:We store the filters as an array (compile time size) which is why you can't have more than 5.

It's done this way for performance reasons.
And negative filter? It takes all, but not the specified.
Honestly, it would be best for all integers to be accepted for filter count, with negatives being a blacklist, like you say.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13210
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow filtered inserters to have more than 5 filters

Post by Rseding91 »

bigyihsuan wrote:
darkfrei wrote:
Rseding91 wrote:We store the filters as an array (compile time size) which is why you can't have more than 5.

It's done this way for performance reasons.
And negative filter? It takes all, but not the specified.
Honestly, it would be best for all integers to be accepted for filter count, with negatives being a blacklist, like you say.
No. Making it a compile time max size gives a massive performance improvement because the memory doesn't need to be dynamically allocated and dereferenced every time the inserter checks the filter.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Won't implement”