Skip to content

Commit

Permalink
Update 'nodeupdate()' to 'check_for_falling()' API
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat committed Nov 22, 2016
1 parent 208c9f4 commit 09a229b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .luacheckrc
Expand Up @@ -5,7 +5,7 @@ read_globals = {
"DIR_DELIM",
"minetest", "core",
"dump",
"vector", "nodeupdate", "nodeupdate_single",
"vector",
"VoxelManip", "VoxelArea",
"PseudoRandom", "ItemStack",
}
Expand Down
2 changes: 1 addition & 1 deletion mods/beds/api.lua
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mods/default/functions.lua
Expand Up @@ -356,7 +356,7 @@ minetest.register_abm({
end
-- Remove node
minetest.remove_node(pos)
nodeupdate(pos)
minetest.check_for_falling(pos)
end
})

Expand Down
2 changes: 1 addition & 1 deletion mods/doors/init.lua
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion mods/fire/init.lua
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions mods/tnt/init.lua
Expand Up @@ -332,15 +332,15 @@ 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
local rad = {x = x, y = y, z = z}
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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 09a229b

Please sign in to comment.