Skip to content

Commit c0dac4d

Browse files
Ruinerzhul
Rui
authored andcommittedSep 1, 2017
Remove nodeupdate completely (#6358)
1 parent bf403b9 commit c0dac4d

File tree

5 files changed

+3
-29
lines changed

5 files changed

+3
-29
lines changed
 

‎doc/client_lua_api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ Minetest namespace reference
628628
reliable or verifyable. Compatible forks will have a different name and
629629
version entirely. To check for the presence of engine features, test
630630
whether the functions exported by the wanted features exist. For example:
631-
`if minetest.nodeupdate then ... end`.
631+
`if minetest.check_for_falling then ... end`.
632632

633633
### Logging
634634
* `minetest.debug(...)`

‎doc/lua_api.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2313,7 +2313,7 @@ Strings that need to be translated can contain several escapes, preceded by `@`.
23132313
reliable or verifyable. Compatible forks will have a different name and
23142314
version entirely. To check for the presence of engine features, test
23152315
whether the functions exported by the wanted features exist. For example:
2316-
`if minetest.nodeupdate then ... end`.
2316+
`if minetest.check_for_falling then ... end`.
23172317

23182318
### Logging
23192319
* `minetest.debug(...)`

‎games/minimal/mods/experimental/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ minetest.register_on_punchnode(function(p, node)
135135
if node.name == "experimental:tnt" then
136136
minetest.remove_node(p)
137137
minetest.add_entity(p, "experimental:tnt")
138-
nodeupdate(p)
138+
minetest.check_for_falling(p)
139139
end
140140
end)
141141

‎src/script/cpp_api/s_node.cpp

-24
Original file line numberDiff line numberDiff line change
@@ -270,27 +270,3 @@ void ScriptApiNode::node_on_receive_fields(v3s16 p,
270270
PCALL_RES(lua_pcall(L, 4, 0, error_handler));
271271
lua_pop(L, 1); // Pop error handler
272272
}
273-
274-
void ScriptApiNode::node_falling_update(v3s16 p)
275-
{
276-
SCRIPTAPI_PRECHECKHEADER
277-
278-
int error_handler = PUSH_ERROR_HANDLER(L);
279-
280-
lua_getglobal(L, "nodeupdate");
281-
push_v3s16(L, p);
282-
PCALL_RES(lua_pcall(L, 1, 0, error_handler));
283-
lua_pop(L, 1); // Pop error handler
284-
}
285-
286-
void ScriptApiNode::node_falling_update_single(v3s16 p)
287-
{
288-
SCRIPTAPI_PRECHECKHEADER
289-
290-
int error_handler = PUSH_ERROR_HANDLER(L);
291-
292-
lua_getglobal(L, "nodeupdate_single");
293-
push_v3s16(L, p);
294-
PCALL_RES(lua_pcall(L, 1, 0, error_handler));
295-
lua_pop(L, 1); // Pop error handler
296-
}

‎src/script/cpp_api/s_node.h

-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ class ScriptApiNode
4848
const std::string &formname,
4949
const StringMap &fields,
5050
ServerActiveObject *sender);
51-
void node_falling_update(v3s16 p);
52-
void node_falling_update_single(v3s16 p);
5351
public:
5452
static struct EnumString es_DrawType[];
5553
static struct EnumString es_ContentParamType[];

0 commit comments

Comments
 (0)
Please sign in to comment.