diff options
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | bonemeal.lua | 5 | ||||
-rw-r--r-- | crystal.lua | 82 | ||||
-rw-r--r-- | depends.txt | 1 |
4 files changed, 56 insertions, 38 deletions
@@ -10,6 +10,12 @@ Ethereal Mapgen mod for Minetest (works on all except v6) ## Changelog +### 1.23 + + - Added bonemeal support for bush sapling and acacia bush sapling + - Added support for [toolranks] mod if found + - Reworked Crystal Shovel so it acts more like a normal shovel with soft touch + ### 1.22 - Added coral and silver sand to mapgen (0.4.15 only) diff --git a/bonemeal.lua b/bonemeal.lua index 60c025c..ce8be4c 100644 --- a/bonemeal.lua +++ b/bonemeal.lua @@ -219,6 +219,11 @@ local function growth(pointed_thing) elseif node.name == "default:aspen_sapling"
and enough_height(pos, 11) then
default.grow_new_aspen_tree(pos)
+
+ elseif node.name == "default:bush_sapling" then
+ default.grow_bush(pos)
+ elseif node.name == "default:acacia_bush_sapling" then
+ default.grow_acacia_bush(pos)
end
return
diff --git a/crystal.lua b/crystal.lua index 8ee06ed..0af1296 100644 --- a/crystal.lua +++ b/crystal.lua @@ -166,51 +166,38 @@ minetest.register_craft({ } }) --- Crystal Shovel (with Soft Touch so player can dig up dirt with grass intact) -minetest.register_tool("ethereal:shovel_crystal", { - description = S("Crystal (soft touch) Shovel"), - inventory_image = "crystal_shovel.png", - wield_image = "crystal_shovel.png^[transformR90", - sound = {breaks = "default_tool_breaks"}, - on_use = function(itemstack, user, pointed_thing) +local old_handle_node_drops = minetest.handle_node_drops - if pointed_thing.type ~= "node" then - return - end +function minetest.handle_node_drops(pos, drops, digger) - -- Check if node protected - if minetest.is_protected(pointed_thing.under, user:get_player_name()) then - return - end + -- are we holding Crystal Shovel? + if digger:get_wielded_item():get_name() ~= "ethereal:shovel_crystal" then + return old_handle_node_drops(pos, drops, digger) + end - local pos = pointed_thing.under - local nn = minetest.get_node(pos).name + local nn = minetest.get_node(pos).name - -- Is node dirt, sand or gravel - if minetest.get_item_group(nn, "crumbly") > 0 then + if minetest.get_item_group(nn, "crumbly") == 0 then + return old_handle_node_drops(pos, drops, digger) + end - local inv = user:get_inventory() + return old_handle_node_drops(pos, {ItemStack(nn)}, digger) +end - minetest.remove_node(pointed_thing.under) - ethereal.check_falling(pos) - - if minetest.setting_getbool("creative_mode") then - - if not inv:contains_item("main", {name = nn}) then - inv:add_item("main", {name = nn}) - end - else - - inv:add_item("main", {name = nn}) - itemstack:add_wear(65535 / 100) -- 111 uses - end - - minetest.sound_play("default_dig_crumbly", {pos = pos, gain = 0.4}) - - return itemstack - end - end, +minetest.register_tool("ethereal:shovel_crystal", { + description = "Crystal Shovel", + inventory_image = "crystal_shovel.png", + wield_image = "crystal_shovel.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + crumbly = {times={[1]=1.10, [2]=0.50, [3]=0.30}, uses=30, maxlevel=3}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, }) minetest.register_craft({ @@ -244,3 +231,22 @@ minetest.register_craft({ "ethereal:crystal_ingot" }, }) + +-- Add [toolranks] mod support if found +if minetest.get_modpath("toolranks") then + +minetest.override_item("ethereal:pick_crystal", { + original_description = "Crystal Pickaxe", + description = toolranks.create_description("Crystal Pickaxe", 0, 1), + after_use = toolranks.new_afteruse}) + +minetest.override_item("ethereal:axe_crystal", { + original_description = "Crystal Axe", + description = toolranks.create_description("Crystal Axe", 0, 1), + after_use = toolranks.new_afteruse}) + +minetest.override_item("ethereal:shovel_crystal", { + original_description = "Crystal Shovel", + description = toolranks.create_description("Crystal Shovel", 0, 1), + after_use = toolranks.new_afteruse}) +end diff --git a/depends.txt b/depends.txt index e21f4b0..5b1b586 100644 --- a/depends.txt +++ b/depends.txt @@ -7,3 +7,4 @@ bakedclay? moreblocks?
intllib?
lucky_block?
+toolranks?
|