Skip to content
Snippets Groups Projects
Commit 3039264f authored by Milan's avatar Milan
Browse files

screwdriver: add diamond and mithril

parent 359febd4
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,7 @@ screwdriver.handler = function(itemstack, user, pointed_thing, mode, uses)
return itemstack
end
-- Screwdriver
-- Screwdriver Steel
minetest.register_tool("screwdriver:screwdriver", {
description = "Screwdriver (left-click rotates face, right-click rotates axis)",
inventory_image = "screwdriver.png",
......@@ -102,6 +102,33 @@ minetest.register_tool("screwdriver:screwdriver", {
end,
})
-- Screwdriver Diamond
minetest.register_tool("screwdriver:screwdriver_diamond", {
description = "Screwdriver (left-click rotates face, right-click rotates axis)",
inventory_image = "screwdriver_diamond.png",
on_use = function(itemstack, user, pointed_thing)
screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_FACE, 800)
return itemstack
end,
on_place = function(itemstack, user, pointed_thing)
screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_AXIS, 800)
return itemstack
end,
})
-- Screwdriver Mithril
minetest.register_tool("screwdriver:screwdriver_mithril", {
description = "Screwdriver (left-click rotates face, right-click rotates axis)",
inventory_image = "screwdriver_mithril.png",
on_use = function(itemstack, user, pointed_thing)
screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_FACE, 1400)
return itemstack
end,
on_place = function(itemstack, user, pointed_thing)
screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_AXIS, 1400)
return itemstack
end,
})
minetest.register_craft({
output = "screwdriver:screwdriver",
......@@ -111,6 +138,25 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "screwdriver:screwdriver_diamond",
recipe = {
{"default:diamond"},
{"group:stick"}
}
})
if minetest.get_modpath("moreores") then
minetest.register_craft({
output = "screwdriver:screwdriver_mithril",
recipe = {
{"moreores:mithril_ingot"},
{"group:stick"}
}
})
end
minetest.register_alias("screwdriver:screwdriver1", "screwdriver:screwdriver")
minetest.register_alias("screwdriver:screwdriver2", "screwdriver:screwdriver")
minetest.register_alias("screwdriver:screwdriver3", "screwdriver:screwdriver")
......
mods/screwdriver/textures/screwdriver_diamond.png

377 B

mods/screwdriver/textures/screwdriver_mithril.png

354 B

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment