From 87f013bf2804833d81c7063a4f8d2fe0a59f29fa Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sun, 14 Dec 2014 23:46:05 +0100 Subject: [PATCH] Merge TenPlus1's screwdriver and new minetest.conf.example --- minetestforfun_game/minetest.conf.example | 2 +- mods/screwdriver/init.lua | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/minetestforfun_game/minetest.conf.example b/minetestforfun_game/minetest.conf.example index b908ad24..b98be573 100644 --- a/minetestforfun_game/minetest.conf.example +++ b/minetestforfun_game/minetest.conf.example @@ -21,4 +21,4 @@ #enable_tnt = # The radius of a TNT explosion -#tnt_radius = 3 +#tnt_radius = 3 \ No newline at end of file diff --git a/mods/screwdriver/init.lua b/mods/screwdriver/init.lua index 05596431..49ea6156 100755 --- a/mods/screwdriver/init.lua +++ b/mods/screwdriver/init.lua @@ -17,8 +17,6 @@ local function screwdriver_handler(itemstack, user, pointed_thing, mode) end local pos = pointed_thing.under - local keys = user:get_player_control() - local player_name = user:get_player_name() if minetest.is_protected(pos, user:get_player_name()) then minetest.record_protection_violation(pos, user:get_player_name()) @@ -47,15 +45,14 @@ local function screwdriver_handler(itemstack, user, pointed_thing, mode) elseif mode == ROTATE_AXIS then n = nextrange(axisdir, 5) * 4 end - + node.param2 = n minetest.swap_node(pos, node) if not minetest.setting_getbool("creative_mode") then itemstack:add_wear(65535 / (USES - 1)) end - - itemstack:set_wear(item_wear) + return itemstack end @@ -82,7 +79,6 @@ minetest.register_craft({ } }) --- Compatibility with original mod minetest.register_alias("screwdriver:screwdriver1", "screwdriver:screwdriver") minetest.register_alias("screwdriver:screwdriver2", "screwdriver:screwdriver") minetest.register_alias("screwdriver:screwdriver3", "screwdriver:screwdriver")