[1.1.109] LuaEntity.infinity_container_filters demands each filter have index on write
Posted: Sun Jun 23, 2024 5:18 pm
To reproduce:
1. In game execute the following command:
2. Observe error.
3. Execute the following command (the given value of index doesn't matter, only needs to be within 1..65536):
4. Observe no error.
Expected behavior:
The filters are applied by the first command without issue, as per the docs the index field is not required for assigning filters. Or, if not that, the value of index has any effect at all.
Feel free to move this into the docs requests if you think the current pointless behavior is the correct one of the two.
1. In game execute the following command:
Code: Select all
/c game.player.surface.create_entity{name = 'infinity-chest', position = game.player.position}.infinity_container_filters = {{name = 'plastic-bar', count = 100}}
3. Execute the following command (the given value of index doesn't matter, only needs to be within 1..65536):
Code: Select all
/c game.player.surface.create_entity{name = 'infinity-chest', position = game.player.position}.infinity_container_filters = {{name = 'plastic-bar', count = 100, index = 100}}
Expected behavior:
The filters are applied by the first command without issue, as per the docs the index field is not required for assigning filters. Or, if not that, the value of index has any effect at all.
Feel free to move this into the docs requests if you think the current pointless behavior is the correct one of the two.