Page 1 of 1

Make LuaItemPrototype.limitations be nil with no limitations

Posted: Sun Mar 26, 2017 9:07 am
by theRustyKnife
Currently if you read LuaItemPrototype.limitations on a module prototype that has no limitations you'll get an empty table. That is very counter-intuitive as it would suggest the module can't be used with any recipe.
What I would propose is to let it be nil when there are no limitations. This way you could easily tell if a module has limitations or not and prevent weird 'is_table_empty()' checks.
If this doesn't get changed, it would at least be good to mention this odd behavior in the docs.

Thanks, TRK