More filter options for inventories

Things that already exist in the current mod API
Post Reply
Rope_
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Apr 03, 2016 9:37 pm
Contact:

More filter options for inventories

Post by Rope_ »

Suggestion One:
Filters on inventories other than the cargo wagon and tool bar/hot bar would be super useful for me right now. Not just in the mod I'm working on either. I often find myself wanting to add filters to the car's inventory.

Suggestion Two:
Filter by item category. I've been working on a bed mod and I wanted to be able to add an inventory slot for different mattress types, but I can only filter on one item.

Suggestion Three:
Lock a filter. Basically be able to specify a filter and then lock it somehow so a player can't remove it. It would allow me to create a single purpose container.
Something like:

Code: Select all

set_filter(filter: string, slot: uint, can_edit: boolean)
Thanks :)

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

Re: More filter options for inventories

Post by Rseding91 »

Cars/tanks already support filters.
If you want to get ahold of me I'm almost always on Discord.

Rope_
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Apr 03, 2016 9:37 pm
Contact:

Re: More filter options for inventories

Post by Rope_ »

My filter doesn't seem to be working for my car though.

I'm running Factorio version 0.12.29 and I get the error:

Code: Select all

Error while running the event handler: __rope_time__/control.lua:344: Callable only on inserters or cargowagons.
The code for which is:

Code: Select all

342: if entity.name == "bed-frame" and entity.type == "car" then
343:    entity.active = false
344:    entity.set_filter( "polyester-mattress", 1 )
345:    entity.set_filter( "polyester-duvet"   , 2 )
346:    entity.set_filter( "polyester-pillow"  , 3 )
347: end
This is being called inside an on_built_entity event handler.

Thanks.

Post Reply

Return to “Already exists”