Fixed crash-causing bugs.

This commit is contained in:
0gb.us 2013-04-05 14:13:11 -07:00
parent b6b195ef76
commit 2373e66fac
2 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,7 @@ function minetest.item_place_node(itemstack, placer, pointed_thing)
return default_place(itemstack, placer, pointed_thing)
else
minetest.chat_send_player(player, "Area owned by "..owner)
return itemstack
end
end

View File

@ -3,6 +3,9 @@ if minetest.get_modpath("screwdriver") then
local tool = minetest.registered_items["screwdriver:screwdriver"..i]
local on_use = tool.on_use
function tool.on_use(itemstack, user, pointed_thing)
if pointed_thing.type~="node" then
screwdriver_handler(itemstack,user,pointed_thing)
end
local pos = minetest.get_pointed_thing_position(pointed_thing,above)
local node=minetest.env:get_node(pos)
local name = user:get_player_name()
@ -15,7 +18,9 @@ if minetest.get_modpath("screwdriver") then
else
local owner = landclaim_0gb_us.get_owner(pos)
minetest.chat_send_player(name, "Area owned by "..owner)
return itemstack
end
end
end
end