From 3b04e013bad97cb62df46adae316bf766db1763c Mon Sep 17 00:00:00 2001 From: david Date: Sat, 27 Mar 2021 17:28:43 -0400 Subject: [PATCH] Pickaxes can now be changed via factor By default all durapicks will get 12 times their normal durabilities, and it's customizable. --- README.md | 6 ++++-- bronze.lua | 2 +- dev.lua | 10 +++++----- diamond.lua | 2 +- init.lua | 19 ++++++++++++------- mese.lua | 2 +- steel.lua | 2 +- stone.lua | 2 +- wood.lua | 2 +- 9 files changed, 27 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index b2a597e..5e45f57 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,11 @@ Need a very good and durable pickaxe? The answer to both of these good questions is with a Durapick! -Each pickaxe is a bit expensive but worth it, sitting at about 5 times the durability of the standard dull boring default pickaxe. +Each pickaxe is a bit expensive but worth it. -Collect them all and make a very powerful Dev Pickaxe, unlimited durability mines everything in insane speeds and did I mention it's fast too. +Just edit the init.lua file's settings area and edit things like durapick_durability_factor to make pickaxes many times stronger than their default counterpicks. + +Collect them all and make a very powerful Dev Pickaxe, unlimited durability (or if the setting is true then Dev Pickaxe will have durability) mines everything in insane speeds and did I mention it's fast too. :P By: Beanzilla diff --git a/bronze.lua b/bronze.lua index 000e74d..e536225 100644 --- a/bronze.lua +++ b/bronze.lua @@ -6,7 +6,7 @@ minetest.register_tool("durapick:bronze_pick", { full_punch_interval = 1.0, max_drop_level=1, groupcaps={ - cracky = {times={[1]=4.50, [2]=1.80, [3]=0.90}, uses=durapick_durability_bronze, maxlevel=2}, + cracky = {times={[1]=4.50, [2]=1.80, [3]=0.90}, uses=(durapick_durability_bronze * durapick_durability_factor), maxlevel=2}, }, damage_groups = {fleshy=4}, }, diff --git a/dev.lua b/dev.lua index 105a797..8efd79a 100644 --- a/dev.lua +++ b/dev.lua @@ -12,11 +12,11 @@ if durapick_durability_dev then max_drop_level=3, groupcaps={ -- This will mine everything in 0.5 seconds - cracky={times={[1]=0.5, [2]=0.5, [3]=0.5}, durapick_durability_dev_amt, maxlevel=255}, - crumbly={times={[1]=0.5, [2]=0.5, [3]=0.5}, durapick_durability_dev_amt, maxlevel=255}, - snappy={times={[1]=0.5, [2]=0.5, [3]=0.5}, durapick_durability_dev_amt, maxlevel=255}, - choppy={times={[1]=0.5, [2]=0.5, [3]=0.5}, durapick_durability_dev_amt, maxlevel=255}, - dig_immediate={times={[1]=0.5, [2]=0.5, [3]=0.5}, durapick_durability_dev_amt, maxlevel=255}, + cracky={times={[1]=0.5, [2]=0.5, [3]=0.5}, (durapick_durability_dev_amt * durapick_durability_factor), maxlevel=255}, + crumbly={times={[1]=0.5, [2]=0.5, [3]=0.5}, (durapick_durability_dev_amt * durapick_durability_factor), maxlevel=255}, + snappy={times={[1]=0.5, [2]=0.5, [3]=0.5}, (durapick_durability_dev_amt * durapick_durability_factor), maxlevel=255}, + choppy={times={[1]=0.5, [2]=0.5, [3]=0.5}, (durapick_durability_dev_amt * durapick_durability_factor), maxlevel=255}, + dig_immediate={times={[1]=0.5, [2]=0.5, [3]=0.5}, (durapick_durability_dev_amt * durapick_durability_factor), maxlevel=255}, }, -- Modified damage due to the fact it is craftable damage_groups = {fleshy=8}, diff --git a/diamond.lua b/diamond.lua index 9829c30..64cfe89 100644 --- a/diamond.lua +++ b/diamond.lua @@ -6,7 +6,7 @@ minetest.register_tool("durapick:diamond_pick", { full_punch_interval = 0.9, max_drop_level=3, groupcaps={ - cracky = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=durapick_durability_diamond, maxlevel=3}, + cracky = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=(durapick_durability_diamond * durapick_durability_factor), maxlevel=3}, }, damage_groups = {fleshy=5}, }, diff --git a/init.lua b/init.lua index 390806c..8195e67 100644 --- a/init.lua +++ b/init.lua @@ -4,15 +4,18 @@ local moreblocks = minetest.get_modpath("moreblocks") -- Settings -- Durabilites -durapick_durability_wood = 270 -- default:pick_wood 30 -durapick_durability_stone = 540 -- default:pick_stone 60 -durapick_durability_steel = 1620 -- default:pick_steel 180 -durapick_durability_bronze = 1620 -- default:pick_bronze 180 -durapick_durability_mese = 4860 -- default:pick_mese 540 -durapick_durability_diamond = 5490 -- default:pick_diamond 610 +durapick_durability_wood = 30 -- default:pick_wood 30 +durapick_durability_stone = 60 -- default:pick_stone 60 +durapick_durability_steel = 180 -- default:pick_steel 180 +durapick_durability_bronze = 360 -- default:pick_bronze 180 +durapick_durability_mese = 540 -- default:pick_mese 540 +durapick_durability_diamond = 610 -- default:pick_diamond 610 durapick_durability_dev = false -- Does the Dev Pickaxe have a durability? -durapick_durability_dev_amt = durapick_durability_diamond * 9 +durapick_durability_dev_amt = 730 + +-- How many pickaxes are 1 durapick equal too? +durapick_durability_factor = 12 -- Resources durapick_stick = "default:stick" @@ -25,6 +28,8 @@ if moreblocks then -- If moreblocks exists, use compressed cobble else -- If not, then use something default durapick_resource_stone = "default:stonebrick" end + +-- Custom Resource durapick_resource_wood_post = "durapick:dura_wood" durapick_resource_wood_pre = "group:wood" diff --git a/mese.lua b/mese.lua index e6697d3..e0c315c 100644 --- a/mese.lua +++ b/mese.lua @@ -6,7 +6,7 @@ minetest.register_tool("durapick:mese_pick", { full_punch_interval = 0.8, max_drop_level=3, groupcaps={ - cracky = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=durapick_durability_mese, maxlevel=3}, + cracky = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=(durapick_durability_mese * durapick_durability_factor), maxlevel=3}, }, damage_groups = {fleshy=5}, }, diff --git a/steel.lua b/steel.lua index 51e8e87..97f3c77 100644 --- a/steel.lua +++ b/steel.lua @@ -6,7 +6,7 @@ minetest.register_tool("durapick:steel_pick", { full_punch_interval = 1.0, max_drop_level=1, groupcaps={ - cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=durapick_durability_steel, maxlevel=2}, + cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=(durapick_durability_steel * durapick_durability_factor), maxlevel=2}, }, damage_groups = {fleshy=4}, }, diff --git a/stone.lua b/stone.lua index 822ede3..0ff12b3 100644 --- a/stone.lua +++ b/stone.lua @@ -7,7 +7,7 @@ minetest.register_tool("durapick:stone_pick", { max_drop_level=1, groupcaps={ -- Added ability for stone pick to mine like steel pick, just slower - cracky = {times={[2]=2.0, [3]=1.00}, uses=durapick_durability_stone, maxlevel=1}, + cracky = {times={[2]=2.0, [3]=1.00}, uses=(durapick_durability_stone * durapick_durability_factor), maxlevel=1}, }, damage_groups = {fleshy=4}, }, diff --git a/wood.lua b/wood.lua index bb62c8f..46f7df5 100644 --- a/wood.lua +++ b/wood.lua @@ -7,7 +7,7 @@ minetest.register_tool("durapick:wood_pick", { max_drop_level=1, groupcaps={ -- Changed it so the wood pick has the ability to mine like a steel pick, just slower - cracky = {times={[3]=1.60}, uses=durapick_durability_wood, maxlevel=1}, + cracky = {times={[3]=1.60}, uses=(durapick_durability_wood * durapick_durability_factor), maxlevel=1}, }, damage_groups = {fleshy=4}, },