From 751cb12ea0a43b69f54b630373909c1e5debf67b Mon Sep 17 00:00:00 2001 From: Pascal Abresch Date: Thu, 19 Dec 2019 20:08:54 +0100 Subject: [PATCH] add big stick --- sparkdebug/lua/bigstick.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sparkdebug/lua/bigstick.lua diff --git a/sparkdebug/lua/bigstick.lua b/sparkdebug/lua/bigstick.lua new file mode 100644 index 0000000..efa87fb --- /dev/null +++ b/sparkdebug/lua/bigstick.lua @@ -0,0 +1,14 @@ +local name = "sparkdebug:bigstick" +local dictionary = {} +local dig_stlye_alt = minetest.settings:get_bool("spark_dig_stlye_alt") +local on_place = function(itemstack, placer, pointed_thing) + if pointed_thing["type"] == "node" then + sparktech.dig_node(pointed_thing["under"], placer:get_inventory(), "main", false, placer) + end + return itemstack +end + +dictionary["on_place"] = on_place +dictionary["inventory_image"] = "bigstick.png" + +minetest.register_tool(name, dictionary)