[0.17.8] LuaInventory.set_filter sets the filter even if a different type of item is in that slot.
Posted: Fri Mar 08, 2019 7:18 am
Step 1: Start a vanilla freeplay. Or put an item other than copper plate into the first slot of your inventory.
Step 2: Run this command: /c game.player.print(game.player.character.get_inventory(defines.inventory.player_main).set_filter(1,"copper-plate"))
What I expected to happen: A printout "false" because the content of the first slot of the inventory collides with the filter it would set.
What happens: A filter is set under the item in the inventory. The next time I remove the item, I can't put it back because of the filter even though the hand still shows up.
Step 2: Run this command: /c game.player.print(game.player.character.get_inventory(defines.inventory.player_main).set_filter(1,"copper-plate"))
What I expected to happen: A printout "false" because the content of the first slot of the inventory collides with the filter it would set.
What happens: A filter is set under the item in the inventory. The next time I remove the item, I can't put it back because of the filter even though the hand still shows up.