"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.
Setting infinity_filters does not work
Re: Setting infinity_filters does not work
Thanks for the report. Both issues are now fixed for 0.17. The "nil" return was an error and wasn't meant to happen.
If you want to get ahold of me I'm almost always on Discord.