diff options
author | Hybrid Dog <ovvv@web.de> | 2017-04-10 20:03:53 +0200 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2018-01-03 04:01:15 +0000 |
commit | 345e1041a204ca9d40a25b71ae239ce3275f0755 (patch) | |
tree | bd93d814cac698d5d11bb3867a9999d3c0b963ce /src/script/lua_api | |
parent | d7c1f6c92ec612a13850f0aa58c3541c9a1e19c1 (diff) | |
download | minetest-345e1041a204ca9d40a25b71ae239ce3275f0755.tar.gz minetest-345e1041a204ca9d40a25b71ae239ce3275f0755.tar.bz2 minetest-345e1041a204ca9d40a25b71ae239ce3275f0755.zip |
Tool.cpp/.h, lua_api/l_util.cpp: Tidy up code and remove dead code
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_util.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/script/lua_api/l_util.cpp b/src/script/lua_api/l_util.cpp index 839c4be11..501261dd7 100644 --- a/src/script/lua_api/l_util.cpp +++ b/src/script/lua_api/l_util.cpp @@ -158,18 +158,14 @@ int ModApiUtil::l_write_json(lua_State *L) return 1; } -// get_dig_params(groups, tool_capabilities[, time_from_last_punch]) +// get_dig_params(groups, tool_capabilities) int ModApiUtil::l_get_dig_params(lua_State *L) { NO_MAP_LOCK_REQUIRED; ItemGroupList groups; read_groups(L, 1, groups); ToolCapabilities tp = read_tool_capabilities(L, 2); - if(lua_isnoneornil(L, 3)) - push_dig_params(L, getDigParams(groups, &tp)); - else - push_dig_params(L, getDigParams(groups, &tp, - luaL_checknumber(L, 3))); + push_dig_params(L, getDigParams(groups, &tp)); return 1; } |