Page 1 of 1

LuaControl.get_craftable_count doesnt work for LuaRecipe

Posted: Mon Jan 29, 2018 10:10 pm
by unobtanium
Just tried to pass a LuaRecipe to the get_craftable_count function and it returned

Code: Select all

 #-1 to 'get_craftable_count' (string expected, got table)
In the API documentation it says, i can either pass a string or an entire LuaRecipe. Passing a string works (e.g. extracting the name out of the LuaRecipe), but passing the whole LuaRecipe does not.

Tested this in version 0.15.40.

LuaControl.get_craftable_count

Re: LuaControl.get_craftable_count doesnt work for LuaRecipe

Posted: Mon Jan 29, 2018 10:29 pm
by DaveMcW
Confirmed in 0.16.20. This should be reported as a bug.

Re: LuaControl.get_craftable_count doesnt work for LuaRecipe

Posted: Mon Jan 29, 2018 10:47 pm
by Rseding91
DaveMcW wrote:Confirmed in 0.16.20. This should be reported as a bug.
I've fixed it for the next version of 0.16.

Re: LuaControl.get_craftable_count doesnt work for LuaRecipe

Posted: Tue Jan 30, 2018 1:57 pm
by unobtanium
Thanks a lot!