Here are some test cases:
Code: Select all
/c p=game.player; s=p.cursor_stack; s.set_stack('item-with-inventory'); s.get_inventory(1).set_filter(1, 'pipe'); p.insert(s); s.clear()
Code: Select all
/c p=game.player; s=p.cursor_stack; s.set_stack('item-with-inventory'); s.get_inventory(1).set_filter(1, 'pipe'); p.surface.spill_item_stack(p.position, s); s.clear()
One can verify that the filter is correctly set and that this doesn't happen when the player manually transfers the item or drops it on the ground:
Code: Select all
/c p=game.player; s=p.cursor_stack; s.set_stack('item-with-inventory'); s.get_inventory(1).set_filter(1, 'pipe')