Remove nodeupdate completely (#6358)
authorRui <rui.minetest@gmail.com>
Fri, 1 Sep 2017 11:40:09 +0000 (20:40 +0900)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Fri, 1 Sep 2017 11:40:09 +0000 (13:40 +0200)
doc/client_lua_api.md
doc/lua_api.txt
games/minimal/mods/experimental/init.lua
src/script/cpp_api/s_node.cpp
src/script/cpp_api/s_node.h

index 5be007c75657acd0d2645cd1a994a39b73d06add..44c7c27874274cb35e6da40ce7faad8374ca2e91 100644 (file)
@@ -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(...)`
index 4c0b3db2a8c52de7f0df4988489f1ebdf4816061..13227260cdd7bc00f0cca1068d5826bbab6368bf 100644 (file)
@@ -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(...)`
index ba7a8901878fa7784f4b1fedecd9748e1d0f1b95..afa136777a748c62bd7b87fc32f07ed229d72581 100644 (file)
@@ -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)
 
index 591e269750dad84ee431f8928e3721c20b5bb5e9..c8f85317e63051505a013b6591b3144712579afc 100644 (file)
@@ -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
-}
index 5b6509c83fba739942f7e4d9b9445e932ee1121a..e7c0c01d18ada7f34f8d96686771dcae33bcb5af 100644 (file)
@@ -48,8 +48,6 @@ public:
                        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[];