[Rseding91] item-with-inventory filters lost transferring the item
Posted: Mon Jul 03, 2017 4:50 pm
I have an item-with-inventory with filters set but when transferring it to the player inventory or placing it on the ground via script, the filters are cleared.
Here are some test cases:
In both cases, the item's inventory (in inventory or picked from the ground) lacks the filter.
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:
With the item in hand, place it in inventory or drop it on the ground and pick it up: the filter is correctly set.
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')