Make LuaItemPrototype.limitations be nil with no limitations

Post Reply
User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

Make LuaItemPrototype.limitations be nil with no limitations

Post 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

Post Reply

Return to “Implemented mod requests”