Add slot filter support to script inventories

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 449
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Add slot filter support to script inventories

Post by raiguard »

Script inventories are the best! I love them. But they don't support slot filters! It would be nice if they did.

I'm using script inventories to sync inventory contents when a player goes between the map editor and regular play. Right now, it doesn't sync inventory filters because script inventories don't support them. If they did, I could simply set the filter for that slot in the sync inventory, then when transferring from the sync inventory to the destination inventory, set the filter there as well.

Thanks!
Don't forget, you're here forever.

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 449
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: Add slot filter support to script inventories

Post by raiguard »

Bump. I need to be able to set filters in script inventories to make my inventory sync logic work properly. Right now, it doesn't work properly because when I set_stack on a stack with a filter, as soon as the next stack is set, the inventory gets sorted and that item whizzes away. So when I switch back to regular play from the editor, not all items are transferred because they get overwritten.

Basically, I need inventory filters really badly. Thanks!

PS: Being able to disable auto-sort for the script inventories would be nice as well.
Don't forget, you're here forever.

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

Re: Add slot filter support to script inventories

Post by Rseding91 »

Script inventories do not auto-sort.
If you want to get ahold of me I'm almost always on Discord.

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 449
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: Add slot filter support to script inventories

Post by raiguard »

Rseding91 wrote:
Mon May 18, 2020 7:00 am
Script inventories do not auto-sort.
Well... huh! I was wrong, thanks for pointing that out!

I was able to make a workaround to sync slot filters. However, it would still be nice if script inventories supported filters, to achieve maximum flexibility.
Don't forget, you're here forever.

Post Reply

Return to “Modding interface requests”