Skip to content

Commit

Permalink
Remove nodeupdate completely (#6358)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui authored and nerzhul committed Sep 1, 2017
1 parent bf403b9 commit c0dac4d
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 29 deletions.
2 changes: 1 addition & 1 deletion doc/client_lua_api.md
Expand Up @@ -628,7 +628,7 @@ Minetest namespace reference
reliable or verifyable. Compatible forks will have a different name and
version entirely. To check for the presence of engine features, test
whether the functions exported by the wanted features exist. For example:
`if minetest.nodeupdate then ... end`.
`if minetest.check_for_falling then ... end`.

### Logging
* `minetest.debug(...)`
Expand Down
2 changes: 1 addition & 1 deletion doc/lua_api.txt
Expand Up @@ -2313,7 +2313,7 @@ Strings that need to be translated can contain several escapes, preceded by `@`.
reliable or verifyable. Compatible forks will have a different name and
version entirely. To check for the presence of engine features, test
whether the functions exported by the wanted features exist. For example:
`if minetest.nodeupdate then ... end`.
`if minetest.check_for_falling then ... end`.

### Logging
* `minetest.debug(...)`
Expand Down
2 changes: 1 addition & 1 deletion games/minimal/mods/experimental/init.lua
Expand Up @@ -135,7 +135,7 @@ minetest.register_on_punchnode(function(p, node)
if node.name == "experimental:tnt" then
minetest.remove_node(p)
minetest.add_entity(p, "experimental:tnt")
nodeupdate(p)
minetest.check_for_falling(p)
end
end)
Expand Down
24 changes: 0 additions & 24 deletions src/script/cpp_api/s_node.cpp
Expand Up @@ -270,27 +270,3 @@ void ScriptApiNode::node_on_receive_fields(v3s16 p,
PCALL_RES(lua_pcall(L, 4, 0, error_handler));
lua_pop(L, 1); // Pop error handler
}

void ScriptApiNode::node_falling_update(v3s16 p)
{
SCRIPTAPI_PRECHECKHEADER

int error_handler = PUSH_ERROR_HANDLER(L);

lua_getglobal(L, "nodeupdate");
push_v3s16(L, p);
PCALL_RES(lua_pcall(L, 1, 0, error_handler));
lua_pop(L, 1); // Pop error handler
}

void ScriptApiNode::node_falling_update_single(v3s16 p)
{
SCRIPTAPI_PRECHECKHEADER

int error_handler = PUSH_ERROR_HANDLER(L);

lua_getglobal(L, "nodeupdate_single");
push_v3s16(L, p);
PCALL_RES(lua_pcall(L, 1, 0, error_handler));
lua_pop(L, 1); // Pop error handler
}
2 changes: 0 additions & 2 deletions src/script/cpp_api/s_node.h
Expand Up @@ -48,8 +48,6 @@ class ScriptApiNode
const std::string &formname,
const StringMap &fields,
ServerActiveObject *sender);
void node_falling_update(v3s16 p);
void node_falling_update_single(v3s16 p);
public:
static struct EnumString es_DrawType[];
static struct EnumString es_ContentParamType[];
Expand Down

0 comments on commit c0dac4d

Please sign in to comment.