From 1e540a074624877a9186228e803ae93bc387bcf5 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 26 Jan 2017 19:14:07 +0100 Subject: [PATCH] Remove legacy nodeupdate 4 core.check_for_falling --- mods/default/functions.lua | 2 +- mods/default/nodes.lua | 2 +- mods/fire/init.lua | 2 +- mods/mcl_tnt/init.lua | 4 ++-- mods/redstone/mesecons_mvps/init.lua | 8 ++++---- mods/redstone/mesecons_pistons/init.lua | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mods/default/functions.lua b/mods/default/functions.lua index 1081af3a8e..d40146b9f6 100644 --- a/mods/default/functions.lua +++ b/mods/default/functions.lua @@ -856,7 +856,7 @@ minetest.register_abm({ end -- Remove node minetest.remove_node(p0) - nodeupdate(p0) + core.check_for_falling(p0) end end }) diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 5ef46c9532..76a3a47af4 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -1112,7 +1112,7 @@ minetest.register_node("default:vine", { local node = minetest.get_node(pos2) if node.name == "default:vine" and check_attached_node(pos2, node) == false then drop_attached_node(pos2) - nodeupdate(pos2) + core.check_for_falling(pos2) ptr = ptr + 1 else next_find = false diff --git a/mods/fire/init.lua b/mods/fire/init.lua index dd3026d164..3c1f8a7f10 100644 --- a/mods/fire/init.lua +++ b/mods/fire/init.lua @@ -181,7 +181,7 @@ minetest.register_abm({ return end minetest.remove_node(p) - nodeupdate(p) + core.check_for_falling(p) end else -- remove flame diff --git a/mods/mcl_tnt/init.lua b/mods/mcl_tnt/init.lua index 75f32774fe..2b78240236 100644 --- a/mods/mcl_tnt/init.lua +++ b/mods/mcl_tnt/init.lua @@ -34,7 +34,7 @@ tnt = {} tnt.ignite = function(pos) minetest.remove_node(pos) spawn_tnt(pos, "mcl_tnt:tnt") - nodeupdate(pos) + core.check_for_falling(pos) end @@ -111,7 +111,7 @@ function TNT:on_step(dtime) if n.name ~= "air" and n.name ~= "default:obsidian" and n.name ~= "default:bedrock" and n.name ~= "protector:protect" then activate_if_tnt(n.name, np, pos, 3) minetest.remove_node(np) - nodeupdate(np) + core.check_for_falling(np) if n.name ~= "mcl_tnt:tnt" and math.random() > 0.9 then local drop = minetest.get_node_drops(n.name, "") for _,item in ipairs(drop) do diff --git a/mods/redstone/mesecons_mvps/init.lua b/mods/redstone/mesecons_mvps/init.lua index 5982d7dc3e..a416039c11 100644 --- a/mods/redstone/mesecons_mvps/init.lua +++ b/mods/redstone/mesecons_mvps/init.lua @@ -20,7 +20,7 @@ end function mesecon:mvps_process_stack(stack) -- update mesecons for placed nodes ( has to be done after all nodes have been added ) for _, n in ipairs(stack) do - nodeupdate(n.pos) + core.check_for_falling(n.pos) mesecon.on_placenode(n.pos, minetest.get_node(n.pos)) mesecon:update_autoconnect(n.pos) end @@ -92,8 +92,8 @@ function mesecon:mvps_pull_single(pos, dir) -- pos: pos of mvps; direction: dire minetest.add_node(pos, nn) minetest.get_meta(pos):from_table(meta) - nodeupdate(np) - nodeupdate(pos) + core.check_for_falling(np) + core.check_for_falling(pos) mesecon.on_dignode(np, nn) mesecon:update_autoconnect(np) end @@ -113,7 +113,7 @@ function mesecon:mvps_pull_all(pos, direction) -- pos: pos of mvps; direction: d repeat lnode2 = minetest.get_node(lpos2) minetest.add_node(oldpos, {name=lnode2.name}) - nodeupdate(oldpos) + core.check_for_falling(oldpos) oldpos = {x=lpos2.x, y=lpos2.y, z=lpos2.z} lpos2.x = lpos2.x-direction.x lpos2.y = lpos2.y-direction.y diff --git a/mods/redstone/mesecons_pistons/init.lua b/mods/redstone/mesecons_pistons/init.lua index 4a28546ab7..072c1a499f 100644 --- a/mods/redstone/mesecons_pistons/init.lua +++ b/mods/redstone/mesecons_pistons/init.lua @@ -63,7 +63,7 @@ local piston_remove_pusher = function (pos, node) if pushername == pistonspec.pusher then --make sure there actually is a pusher (for compatibility reasons mainly) minetest.remove_node(pusherpos) - nodeupdate(pusherpos) + core.check_for_falling(pusherpos) end end