From 1b65c84daaec3c9659f24b0faa434d8dcf7e5a0a Mon Sep 17 00:00:00 2001 From: weqqr Date: Sun, 27 Feb 2022 23:20:54 +0300 Subject: [PATCH] Fix screwdriver --- .../lord/_overwrites/MTG/screwdriver/init.lua | 10 ++++-- mods/lord/lord_screwdriver/init.lua | 36 ++++--------------- 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/mods/lord/_overwrites/MTG/screwdriver/init.lua b/mods/lord/_overwrites/MTG/screwdriver/init.lua index 578d704d8..75161d137 100644 --- a/mods/lord/_overwrites/MTG/screwdriver/init.lua +++ b/mods/lord/_overwrites/MTG/screwdriver/init.lua @@ -2,7 +2,11 @@ -- у нас свои отвертки в `lord/lord_screwdriver` minetest.clear_craft({output = "screwdriver:screwdriver"}) -minetest.unregister_item("screwdriver:screwdriver") --- для совместимости с другими модами -minetest.register_alias("screwdriver:screwdriver", "lord_screwdriver:screwdriver") +minetest.register_craft({ + output = "screwdriver:screwdriver", + recipe = { + {"default:steel_ingot", ""}, + {"", "group:stick"} + } +}) diff --git a/mods/lord/lord_screwdriver/init.lua b/mods/lord/lord_screwdriver/init.lua index 2a1c9fff5..bb4c4c59c 100644 --- a/mods/lord/lord_screwdriver/init.lua +++ b/mods/lord/lord_screwdriver/init.lua @@ -3,23 +3,8 @@ -- Load support for MT game translation. local S = minetest.get_translator("lord_screwdriver") --- Standard Screwdriver based on MTG -minetest.register_tool("lord_screwdriver:screwdriver", { - description = S("Screwdriver") .. "\n" .. S("(left-click rotates face, right-click rotates axis)"), - inventory_image = "screwdriver.png", - groups = {tool = 1}, - on_use = function(itemstack, user, pointed_thing) - screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_FACE, 200) - return itemstack - end, - on_place = function(itemstack, user, pointed_thing) - screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_AXIS, 200) - return itemstack - end, -}) - -- Galvorn Screwdriver -minetest.register_tool("lord_screwdriver:screwdriver_galvorn", { +minetest.register_tool(":screwdriver:screwdriver_galvorn", { description = S("Galvorn Screwdriver") .. "\n" .. S("(left-click rotates face, right-click rotates axis)"), inventory_image = "screwdriver_galvorn.png", groups = {tool = 1, galvorn_item = 1}, @@ -33,19 +18,10 @@ minetest.register_tool("lord_screwdriver:screwdriver_galvorn", { end, }) - -minetest.register_craft({ - output = "lord_screwdriver:screwdriver", - recipe = { - {"default:steel_ingot", ""}, - {"", "group:stick"} - } -}) - minetest.register_craft({ - output = "lord_screwdriver:screwdriver_galvorn", - recipe = { - {"lottores:galvorn_ingot", ""}, - {"", "group:stick"} - } + output = "screwdriver:screwdriver_galvorn", + recipe = { + {"lottores:galvorn_ingot", ""}, + {"", "group:stick"} + } })