Page 1 of 1

More filter options for inventories

Posted: Mon Apr 04, 2016 2:56 am
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 :)

Re: More filter options for inventories

Posted: Mon Apr 04, 2016 6:11 am
by Rseding91
Cars/tanks already support filters.

Re: More filter options for inventories

Posted: Mon Apr 04, 2016 2:09 pm
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.