From 990ffb139a59439aeb5e7dfc13a36f82dbe8f9f8 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 17 Jan 2017 01:36:45 +0100 Subject: [PATCH] Make creative hand much faster --- mods/craftingpack/crafting/creative.lua | 17 ----------------- mods/default/tools.lua | 21 ++++++++++++++++----- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/mods/craftingpack/crafting/creative.lua b/mods/craftingpack/crafting/creative.lua index f024a24ad2..25744cb7dd 100644 --- a/mods/craftingpack/crafting/creative.lua +++ b/mods/craftingpack/crafting/creative.lua @@ -305,23 +305,6 @@ end) if minetest.setting_getbool("creative_mode") then - minetest.register_item(":", { - type = "none", - wield_image = "wieldhand.png", - wield_scale = {x=1,y=1,z=2.5}, - tool_capabilities = { - full_punch_interval = 0.5, - max_drop_level = 3, - groupcaps = { - crumbly = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3}, - cracky = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3}, - snappy = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3}, - choppy = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3}, - oddly_breakable_by_hand = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3}, - } - } - }) - minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack) return true end) diff --git a/mods/default/tools.lua b/mods/default/tools.lua index a8556a63bc..f769edb8b6 100644 --- a/mods/default/tools.lua +++ b/mods/default/tools.lua @@ -5,6 +5,21 @@ -- -- The hand +local groupcaps +if minetest.setting_getbool("creative_mode") then + groupcaps = { + snappy = {times={[1]=0, [2]=0, [3]=0}, uses=0, maxlevel=255}, + cracky = {times={[1]=0, [2]=0, [3]=0}, uses=0, maxlevel=255}, + crumbly = {times={[1]=0, [2]=0, [3]=0}, uses=0, maxlevel=255}, + oddly_breakable_by_hand = {times={[1]=0, [2]=0, [3]=0, [4]=0, [5]=0}, uses=0, maxlevel=255}, + } +else + groupcaps = { + crumbly = {times={[2]=3.00, [3]=0.70}, uses=0, maxlevel=1}, + snappy = {times={[3]=0.40}, uses=0, maxlevel=1}, + oddly_breakable_by_hand = {times={[0]=90.00,[1]=7.00,[2]=4.00,[3]=1.40,[4]=480.70,}, uses=0, maxlevel=5} + } +end minetest.register_item(":", { type = "none", wield_image = "wieldhand.png", @@ -12,11 +27,7 @@ minetest.register_item(":", { tool_capabilities = { full_punch_interval = 0.25, max_drop_level = 0, - groupcaps = { - crumbly = {times={[2]=3.00, [3]=0.70}, uses=0, maxlevel=1}, - snappy = {times={[3]=0.40}, uses=0, maxlevel=1}, - oddly_breakable_by_hand = {times={[0]=90.00,[1]=7.00,[2]=4.00,[3]=1.40,[4]=480.70,}, uses=0, maxlevel=5} - }, + groupcaps = groupcaps, damage_groups = {fleshy=1}, } })