diff --git a/spec_bomb.lua b/spec_bomb.lua index bbe9935..7845bb2 100644 --- a/spec_bomb.lua +++ b/spec_bomb.lua @@ -1,4 +1,4 @@ -local function disintigrate(pos, radius, node_name, user, dropped) +local function disintigrate(pos, radius, node_name, user_name, dropped) local node_id = minetest.get_content_id(node_name) local air = minetest.get_content_id('air') local minp = vector.subtract(pos, radius) @@ -17,7 +17,7 @@ local function disintigrate(pos, radius, node_name, user, dropped) local ivm = area:index(minp.x, y, z) for x = minp.x, maxp.x do p.x = x - if data[ivm] == node_id and not minetest.is_protected(p, user) then + if data[ivm] == node_id and not minetest.is_protected(p, user_name) then data[ivm] = air count = count + 1 if count % 50 == 0 then @@ -49,7 +49,7 @@ local function disintigrate(pos, radius, node_name, user, dropped) end -local function floor(pos, blocks, node_name, user) +local function floor(pos, blocks, node_name, user_name) local p = {y = pos.y} local count = 0 for r = 1, blocks do @@ -59,7 +59,7 @@ local function floor(pos, blocks, node_name, user) p.x = pos.x + x local node = minetest.get_node_or_nil(p) - if node and node.name == 'air' and not minetest.is_protected(p, user) then + if node and node.name == 'air' and not minetest.is_protected(p, user_name) then minetest.set_node(p, {name = node_name}) count = count + 1 if count > blocks then