Page 1 of 1

Setting infinity_filters does not work

Posted: Sun Dec 16, 2018 9:16 pm
by Boodals
"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.

Re: Setting infinity_filters does not work

Posted: Sat Dec 22, 2018 6:01 am
by Rseding91
Thanks for the report. Both issues are now fixed for 0.17. The "nil" return was an error and wasn't meant to happen.