Fixed error with downspout
This commit is contained in:
parent
0b0194cd9c
commit
321b080701
@ -197,7 +197,7 @@ minetest.register_node("mysheetmetal:downspout_bottom", {
|
||||
}
|
||||
},
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
minetest.set_node({x = pos.x, y = pos.y, z = pos.z},{name = "mysheetmetal:downspout_bottomw", param2=minetest.dir_to_facedir(puncher:get_look_dir())})
|
||||
minetest.set_node({x = pos.x, y = pos.y, z = pos.z},{name = "mysheetmetal:downspout_bottomw", param2=node.param2})
|
||||
end
|
||||
|
||||
})
|
||||
@ -248,17 +248,9 @@ minetest.register_node("mysheetmetal:downspout_bottomw", {
|
||||
{-0.125, -0.5, -0.125, 0.125, -0.3125, 0.5},
|
||||
}
|
||||
},
|
||||
after_place_node = function(pos, placer)
|
||||
local meta = minetest.get_meta(pos);
|
||||
meta:set_string("owner", (placer:get_player_name() or ""));
|
||||
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
local owner = minetest.get_meta(pos).owner
|
||||
if puncher == owner then
|
||||
minetest.set_node({x = pos.x, y = pos.y, z = pos.z},{name = "mysheetmetal:downspout_bottom", param2=minetest.dir_to_facedir(puncher:get_look_dir())})
|
||||
else
|
||||
return
|
||||
end
|
||||
minetest.set_node(pos,{name = "mysheetmetal:downspout_bottom", param2=node.param2})
|
||||
end
|
||||
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user