[1.1.109] LuaEntity.infinity_container_filters demands each filter have index on write

Bugs that are actually features.
Post Reply
curiosity
Filter Inserter
Filter Inserter
Posts: 400
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

[1.1.109] LuaEntity.infinity_container_filters demands each filter have index on write

Post by curiosity »

To reproduce:
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}}
2. Observe error.
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}}
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.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13327
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.109] LuaEntity.infinity_container_filters demands each filter have index on write

Post by Rseding91 »

The index is used, but you didn't set the first 99 values so they got erased from the filters. The docs are specifically about set_infinity_container_filter
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Not a bug”