Page 1 of 1

Add slot filter support to script inventories

Posted: Sat Apr 25, 2020 4:12 am
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!

Re: Add slot filter support to script inventories

Posted: Sun May 17, 2020 5:25 pm
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.

Re: Add slot filter support to script inventories

Posted: Mon May 18, 2020 7:00 am
by Rseding91
Script inventories do not auto-sort.

Re: Add slot filter support to script inventories

Posted: Mon May 18, 2020 9:30 pm
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.