mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-12 11:00:25 +01:00
try a tweak for the perfect screwdriver uses
A TESTER
This commit is contained in:
parent
4d605f093d
commit
0bd6e98805
@ -9,6 +9,7 @@ end
|
|||||||
local ROTATE_FACE = 1
|
local ROTATE_FACE = 1
|
||||||
local ROTATE_AXIS = 2
|
local ROTATE_AXIS = 2
|
||||||
local USES = 200
|
local USES = 200
|
||||||
|
local USES_perfect = 10000
|
||||||
|
|
||||||
-- Handles rotation
|
-- Handles rotation
|
||||||
local function screwdriver_handler(itemstack, user, pointed_thing, mode)
|
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
|
node.param2 = n
|
||||||
minetest.swap_node(pos, node)
|
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))
|
itemstack:add_wear(65535 / (USES - 1))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user