1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 17:50:37 +01:00

try a tweak for the perfect screwdriver uses

A TESTER
This commit is contained in:
Ombridride 2014-12-29 22:29:12 +01:00
parent 4d605f093d
commit 0bd6e98805

View File

@ -9,6 +9,7 @@ end
local ROTATE_FACE = 1
local ROTATE_AXIS = 2
local USES = 200
local USES_perfect = 10000
-- Handles rotation
local function screwdriver_handler(itemstack, user, pointed_thing, mode)
@ -49,7 +50,9 @@ local function screwdriver_handler(itemstack, user, pointed_thing, mode)
node.param2 = n
minetest.swap_node(pos, node)
if not minetest.setting_getbool("creative_mode") then
if not minetest.setting_getbool("creative_mode") and minetest.register_tool("screwdriver:screwdriver_perfect") then
itemstack:add_wear(65535 / (USES_perfect - 1))
elseif not minetest.setting_getbool("creative_mode")
itemstack:add_wear(65535 / (USES - 1))
end