summaryrefslogtreecommitdiff
path: root/crystal.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-12-01 09:41:23 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2016-12-01 09:41:23 +0000
commit8309e6a777b15a5f9b324c93ff9d89045ebc0eb5 (patch)
tree97b84df63337c7e224ac351f5a097a4b616dc84e /crystal.lua
parent06495be4a079c780f2be6f5099475852913fb0ef (diff)
code tweaks and additions (thanks RQWorldblender)
Diffstat (limited to 'crystal.lua')
-rw-r--r--crystal.lua28
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})