Skip to content
Snippets Groups Projects
Commit fa1096ec authored by est31's avatar est31
Browse files

Fix minetest.get_(all)_craft_recipe(s) regression

Since 03e0dd33 the calls didn't return an output count
for the recipes.
parent 4e6971e5
No related branches found
No related tags found
No related merge requests found
......@@ -332,7 +332,7 @@ int ModApiCraft::l_get_craft_result(lua_State *L)
}
void push_craft_recipe(lua_State *L, IGameDef *gdef,
static void push_craft_recipe(lua_State *L, IGameDef *gdef,
const CraftDefinition *recipe,
const CraftOutput &tmpout)
{
......@@ -363,11 +363,11 @@ void push_craft_recipe(lua_State *L, IGameDef *gdef,
lua_pushstring(L, "unknown");
}
lua_setfield(L, -2, "type");
lua_pushstring(L, tmpout.item.c_str());
lua_pushstring(L, output.item.c_str());
lua_setfield(L, -2, "output");
}
void push_craft_recipes(lua_State *L, IGameDef *gdef,
static void push_craft_recipes(lua_State *L, IGameDef *gdef,
const std::vector<CraftDefinition*> &recipes,
const CraftOutput &output)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment