aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-07-25 07:54:56 +0200
committerest31 <MTest31@outlook.com>2015-07-25 17:33:41 +0200
commitfa1096ec49ee9b2b8ca85ff272930812e657b3c5 (patch)
treeccf7028f38dd0f1c92ad87d6fd7149d7b9143e67 /src/script/lua_api
parent4e6971e59358b40956bb4c25f8f85e4cc018dbec (diff)
downloadminetest-fa1096ec49ee9b2b8ca85ff272930812e657b3c5.tar.gz
minetest-fa1096ec49ee9b2b8ca85ff272930812e657b3c5.tar.bz2
minetest-fa1096ec49ee9b2b8ca85ff272930812e657b3c5.zip
Fix minetest.get_(all)_craft_recipe(s) regression
Since 03e0dd33a847a83d975282c6caf6b926306e7b57 the calls didn't return an output count for the recipes.
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_craft.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/lua_api/l_craft.cpp b/src/script/lua_api/l_craft.cpp
index f59487727..391a0133d 100644
--- a/src/script/lua_api/l_craft.cpp
+++ b/src/script/lua_api/l_craft.cpp
@@ -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)
{