Correct variable names.
This commit is contained in:
parent
5bb654be93
commit
fdc3a6ed19
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue