Update 'nodeupdate()' to 'check_for_falling()' API
authorparamat <mat.gregory@virginmedia.com>
Tue, 22 Nov 2016 04:45:31 +0000 (04:45 +0000)
committerparamat <mat.gregory@virginmedia.com>
Tue, 22 Nov 2016 05:55:36 +0000 (05:55 +0000)
.luacheckrc
mods/beds/api.lua
mods/default/functions.lua
mods/doors/init.lua
mods/fire/init.lua
mods/tnt/init.lua

index 3a4faccb9ad356776664a96d671102048948bc22..52b25132fd5516c4eacd66d599acfa5fd946f6a6 100644 (file)
@@ -5,7 +5,7 @@ read_globals = {
        "DIR_DELIM",
        "minetest", "core",
        "dump",
-       "vector", "nodeupdate", "nodeupdate_single",
+       "vector",
        "VoxelManip", "VoxelArea",
        "PseudoRandom", "ItemStack",
 }
index 3624ea45cc382ae0aab3ad1da2e4aae97b1ac3ae..7b409e9943cd68def5213907f6a615006ee97b4e 100644 (file)
@@ -16,7 +16,7 @@ local function destruct_bed(pos, n)
        if reverse then
                reverse = not reverse
                minetest.remove_node(other)
-               nodeupdate(other)
+               minetest.check_for_falling(other)
        else
                reverse = not reverse
        end
index 175365b2043904a5e22972e5bb7bf8efb4c794fe..37b5d581233973b7ed53aae5f4c7f1a3b4b4c09b 100644 (file)
@@ -356,7 +356,7 @@ minetest.register_abm({
                end
                -- Remove node
                minetest.remove_node(pos)
-               nodeupdate(pos)
+               minetest.check_for_falling(pos)
        end
 })
 
index a30120540d347b3ab5a14b257909a2ce24e8c361..364e7a8af4eab5a4554623f05f283ebf5423846a 100644 (file)
@@ -364,7 +364,7 @@ function doors.register(name, def)
        end
        def.after_dig_node = function(pos, node, meta, digger)
                minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z})
-               nodeupdate({x = pos.x, y = pos.y + 1, z = pos.z})
+               minetest.check_for_falling({x = pos.x, y = pos.y + 1, z = pos.z})
        end
        def.on_rotate = false
 
index c600edc731952f4c8f6420a8fc308b526326ed12..6f14d7270d78d7d9fd15dbadb85fdf4614c1c7d4 100644 (file)
@@ -290,7 +290,7 @@ else -- Fire enabled
                                        def.on_burn(p)
                                else
                                        minetest.remove_node(p)
-                                       nodeupdate(p)
+                                       minetest.check_for_falling(p)
                                end
                        end
                end,
index 0c447f950fd4e7554049547f2ec30d80fe566996..f9bc307c50b1f72600f629d5b99cc4a4cd829997 100644 (file)
@@ -332,7 +332,7 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)
        vm:update_map()
        vm:update_liquids()
 
-       -- call nodeupdate for everything within 1.5x blast radius
+       -- call check_single_for_falling for everything within 1.5x blast radius
        for y = -radius * 1.5, radius * 1.5 do
        for z = -radius * 1.5, radius * 1.5 do
        for x = -radius * 1.5, radius * 1.5 do
@@ -340,7 +340,7 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)
                local s = vector.add(pos, rad)
                local r = vector.length(rad)
                if r / radius < 1.4 then
-                       nodeupdate_single(s)
+                       minetest.check_single_for_falling(s)
                end
        end
        end
@@ -598,7 +598,7 @@ function tnt.register_tnt(def)
                on_construct = function(pos)
                        minetest.sound_play("tnt_ignite", {pos = pos})
                        minetest.get_node_timer(pos):start(4)
-                       nodeupdate(pos)
+                       minetest.check_for_falling(pos)
                end,
        })
 end