From: paramat Date: Tue, 22 Nov 2016 04:45:31 +0000 (+0000) Subject: Update 'nodeupdate()' to 'check_for_falling()' API X-Git-Tag: 0.4.15~33 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=09a229b412401a54cb635a0ffb9f37063798775b;p=oweals%2Fminetest_game.git Update 'nodeupdate()' to 'check_for_falling()' API --- diff --git a/.luacheckrc b/.luacheckrc index 3a4faccb..52b25132 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -5,7 +5,7 @@ read_globals = { "DIR_DELIM", "minetest", "core", "dump", - "vector", "nodeupdate", "nodeupdate_single", + "vector", "VoxelManip", "VoxelArea", "PseudoRandom", "ItemStack", } diff --git a/mods/beds/api.lua b/mods/beds/api.lua index 3624ea45..7b409e99 100644 --- a/mods/beds/api.lua +++ b/mods/beds/api.lua @@ -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 diff --git a/mods/default/functions.lua b/mods/default/functions.lua index 175365b2..37b5d581 100644 --- a/mods/default/functions.lua +++ b/mods/default/functions.lua @@ -356,7 +356,7 @@ minetest.register_abm({ end -- Remove node minetest.remove_node(pos) - nodeupdate(pos) + minetest.check_for_falling(pos) end }) diff --git a/mods/doors/init.lua b/mods/doors/init.lua index a3012054..364e7a8a 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -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 diff --git a/mods/fire/init.lua b/mods/fire/init.lua index c600edc7..6f14d727 100644 --- a/mods/fire/init.lua +++ b/mods/fire/init.lua @@ -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, diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua index 0c447f95..f9bc307c 100644 --- a/mods/tnt/init.lua +++ b/mods/tnt/init.lua @@ -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