Skip to content

Commit

Permalink
Fix minetest.get_(all)_craft_recipe(s) regression
Browse files Browse the repository at this point in the history
Since 03e0dd3 the calls didn't return an output count
for the recipes.
  • Loading branch information
est31 committed Jul 25, 2015
1 parent 4e6971e commit fa1096e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/script/lua_api/l_craft.cpp
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit fa1096e

Please sign in to comment.