Setting infinity_filters does not work
Posted: Sun Dec 16, 2018 9:16 pm
"game.player.selected.infinity_filters = game.player.selected.infinity_filters" gives the error "Unknown item name: name".
"game.player.selected.infinity_filters = {{name = "iron-ore", index = 1 }}" gives the same error, but is valid according to the api docs as far as I can tell.
I asked about it on discord, and Bilka took a look and said that "the writing is just broken".
I can use set_infinity_filter(index, filter) as a work around for now.
Oh, and reading infinity_filters can return nil, but writing doesn't accept nil, only { }. Minor issue but would be nice to not have to do nil checks.
"game.player.selected.infinity_filters = {{name = "iron-ore", index = 1 }}" gives the same error, but is valid according to the api docs as far as I can tell.
I asked about it on discord, and Bilka took a look and said that "the writing is just broken".
I can use set_infinity_filter(index, filter) as a work around for now.
Oh, and reading infinity_filters can return nil, but writing doesn't accept nil, only { }. Minor issue but would be nice to not have to do nil checks.