diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2016-12-01 09:41:23 +0000 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2016-12-01 09:41:23 +0000 |
commit | 8309e6a777b15a5f9b324c93ff9d89045ebc0eb5 (patch) | |
tree | 97b84df63337c7e224ac351f5a097a4b616dc84e /crystal.lua | |
parent | 06495be4a079c780f2be6f5099475852913fb0ef (diff) |
code tweaks and additions (thanks RQWorldblender)
Diffstat (limited to 'crystal.lua')
-rw-r--r-- | crystal.lua | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/crystal.lua b/crystal.lua index 43afac5..ffacfe4 100644 --- a/crystal.lua +++ b/crystal.lua @@ -36,6 +36,14 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = "ethereal:crystal_ingot", + recipe = { + {"ethereal:crystal_spike", "default:mese_crystal"}, + {"default:mese_crystal", "ethereal:crystal_spike"}, + } +}) + -- Crystal Block minetest.register_node("ethereal:crystal_block", { description = S("Crystal Block"), @@ -78,7 +86,8 @@ minetest.register_tool("ethereal:sword_crystal", { }, }, damage_groups = {fleshy = 10}, - } + }, + sound = {breaks = "default_tool_breaks"}, }) minetest.register_craft({ @@ -107,6 +116,7 @@ minetest.register_tool("ethereal:axe_crystal", { }, damage_groups = {fleshy = 7}, }, + sound = {breaks = "default_tool_breaks"}, }) minetest.register_craft({ @@ -118,6 +128,15 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = 'ethereal:axe_crystal', + recipe = { + {'ethereal:crystal_ingot', 'ethereal:crystal_ingot'}, + {'default:steel_ingot', 'ethereal:crystal_ingot'}, + {'default:steel_ingot', ''}, + } +}) + -- Crystal Pick (This will last a while) minetest.register_tool("ethereal:pick_crystal", { description = S("Crystal Pickaxe"), @@ -135,6 +154,7 @@ minetest.register_tool("ethereal:pick_crystal", { }, damage_groups = {fleshy = 7}, }, + sound = {breaks = "default_tool_breaks"}, }) minetest.register_craft({ @@ -152,6 +172,7 @@ minetest.register_tool("ethereal:shovel_crystal", { inventory_image = "crystal_shovel.png", wield_image = "crystal_shovel.png^[transformR90", + sound = {breaks = "default_tool_breaks"}, on_use = function(itemstack, user, pointed_thing) if pointed_thing.type ~= "node" then @@ -176,7 +197,10 @@ minetest.register_tool("ethereal:shovel_crystal", { nodeupdate(pos) inv:add_item("main", {name = nn}) - itemstack:add_wear(65535 / 100) -- 111 uses + + if not minetest.setting_getbool("creative_mode") then + itemstack:add_wear(65535 / 100) -- 111 uses + end minetest.sound_play("default_dirt_footstep", {pos = pos, gain = 0.35}) |