From 2373e66facb4d76bf8234732547ff4b477f4d31c Mon Sep 17 00:00:00 2001 From: "0gb.us" <0gb.us@0gb.us> Date: Fri, 5 Apr 2013 14:13:11 -0700 Subject: [PATCH] Fixed crash-causing bugs. --- 0gb.us_game/mods/landclaim_0gb_us/init.lua | 1 + 0gb.us_game/mods/landclaim_0gb_us/support/screwdriver.lua | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/0gb.us_game/mods/landclaim_0gb_us/init.lua b/0gb.us_game/mods/landclaim_0gb_us/init.lua index e2e61e7..c551dfe 100644 --- a/0gb.us_game/mods/landclaim_0gb_us/init.lua +++ b/0gb.us_game/mods/landclaim_0gb_us/init.lua @@ -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 diff --git a/0gb.us_game/mods/landclaim_0gb_us/support/screwdriver.lua b/0gb.us_game/mods/landclaim_0gb_us/support/screwdriver.lua index 8bc8ac0..03c4d00 100644 --- a/0gb.us_game/mods/landclaim_0gb_us/support/screwdriver.lua +++ b/0gb.us_game/mods/landclaim_0gb_us/support/screwdriver.lua @@ -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 +