mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Tool.cpp/.h, lua_api/l_util.cpp: Tidy up code and remove dead code
This commit is contained in:
parent
d7c1f6c92e
commit
345e1041a2
3 changed files with 27 additions and 49 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue