2016-06-09 07:08:34 -07:00
|
|
|
|
|
|
|
local S = ethereal.intllib
|
|
|
|
|
2014-11-09 11:17:41 -08:00
|
|
|
-- Crystal Spike (Hurts if you touch it - thanks to ZonerDarkRevention for his DokuCraft DeviantArt crystal texture)
|
|
|
|
minetest.register_node("ethereal:crystal_spike", {
|
2016-06-09 07:08:34 -07:00
|
|
|
description = S("Crystal Spike"),
|
2014-11-09 11:17:41 -08:00
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = { "crystal_spike.png" },
|
|
|
|
inventory_image = "crystal_spike.png",
|
|
|
|
wield_image = "crystal_spike.png",
|
|
|
|
paramtype = "light",
|
2016-01-21 06:59:28 -08:00
|
|
|
light_source = 7,
|
2015-07-04 04:22:39 -07:00
|
|
|
sunlight_propagates = true,
|
2014-11-09 11:17:41 -08:00
|
|
|
walkable = false,
|
|
|
|
damage_per_second = 1,
|
2016-12-06 02:48:31 -08:00
|
|
|
groups = {cracky = 1, falling_node = 1, puts_out_fire = 1, cools_lava = 1},
|
2014-11-09 11:17:41 -08:00
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Crystal Ingot
|
|
|
|
minetest.register_craftitem("ethereal:crystal_ingot", {
|
2016-06-09 07:08:34 -07:00
|
|
|
description = S("Crystal Ingot"),
|
2014-11-09 11:17:41 -08:00
|
|
|
inventory_image = "crystal_ingot.png",
|
2015-11-23 12:43:48 -08:00
|
|
|
wield_image = "crystal_ingot.png",
|
2014-11-09 11:17:41 -08:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:crystal_ingot",
|
|
|
|
recipe = {
|
2016-05-17 13:40:05 -07:00
|
|
|
{"default:mese_crystal", "ethereal:crystal_spike"},
|
|
|
|
{"ethereal:crystal_spike", "default:mese_crystal"},
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2016-12-01 01:41:23 -08:00
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:crystal_ingot",
|
|
|
|
recipe = {
|
|
|
|
{"ethereal:crystal_spike", "default:mese_crystal"},
|
|
|
|
{"default:mese_crystal", "ethereal:crystal_spike"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2014-11-09 11:17:41 -08:00
|
|
|
-- Crystal Block
|
|
|
|
minetest.register_node("ethereal:crystal_block", {
|
2016-06-09 07:08:34 -07:00
|
|
|
description = S("Crystal Block"),
|
2014-11-09 11:17:41 -08:00
|
|
|
tiles = {"crystal_block.png"},
|
2016-01-21 06:59:28 -08:00
|
|
|
light_source = 9,
|
2015-06-24 02:00:12 -07:00
|
|
|
is_ground_content = false,
|
2016-12-06 02:48:31 -08:00
|
|
|
groups = {cracky = 1, level = 2, puts_out_fire = 1, cools_lava = 1},
|
2014-11-09 11:17:41 -08:00
|
|
|
sounds = default.node_sound_glass_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:crystal_block",
|
|
|
|
recipe = {
|
|
|
|
{"ethereal:crystal_ingot", "ethereal:crystal_ingot", "ethereal:crystal_ingot"},
|
|
|
|
{"ethereal:crystal_ingot", "ethereal:crystal_ingot", "ethereal:crystal_ingot"},
|
|
|
|
{"ethereal:crystal_ingot", "ethereal:crystal_ingot", "ethereal:crystal_ingot"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:crystal_ingot 9",
|
|
|
|
recipe = {
|
|
|
|
{"ethereal:crystal_block"},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Crystal Sword (Powerful wee beastie)
|
|
|
|
minetest.register_tool("ethereal:sword_crystal", {
|
2016-06-09 07:08:34 -07:00
|
|
|
description = S("Crystal Sword"),
|
2014-11-09 11:17:41 -08:00
|
|
|
inventory_image = "crystal_sword.png",
|
2015-11-23 12:43:48 -08:00
|
|
|
wield_image = "crystal_sword.png",
|
2014-11-09 11:17:41 -08:00
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 0.6,
|
2015-07-04 04:22:39 -07:00
|
|
|
max_drop_level = 1,
|
|
|
|
groupcaps = {
|
|
|
|
snappy = {
|
|
|
|
times = {[1] = 1.70, [2] = 0.70, [3] = 0.25},
|
|
|
|
uses = 50,
|
|
|
|
maxlevel = 3
|
|
|
|
},
|
2014-11-09 11:17:41 -08:00
|
|
|
},
|
2015-07-04 04:22:39 -07:00
|
|
|
damage_groups = {fleshy = 10},
|
2016-12-01 01:41:23 -08:00
|
|
|
},
|
|
|
|
sound = {breaks = "default_tool_breaks"},
|
2014-11-09 11:17:41 -08:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:sword_crystal",
|
|
|
|
recipe = {
|
2016-05-17 13:40:05 -07:00
|
|
|
{"ethereal:crystal_ingot"},
|
|
|
|
{"ethereal:crystal_ingot"},
|
|
|
|
{"default:steel_ingot"},
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Crystal Axe
|
|
|
|
minetest.register_tool("ethereal:axe_crystal", {
|
2016-06-09 07:08:34 -07:00
|
|
|
description = S("Crystal Axe"),
|
2014-11-09 11:17:41 -08:00
|
|
|
inventory_image = "crystal_axe.png",
|
2015-11-23 12:43:48 -08:00
|
|
|
wield_image = "crystal_axe.png",
|
2014-11-09 11:17:41 -08:00
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 0.8,
|
2015-07-04 04:22:39 -07:00
|
|
|
max_drop_level = 1,
|
|
|
|
groupcaps = {
|
|
|
|
choppy = {
|
|
|
|
times = {[1] = 2.00, [2] = 0.80, [3] = 0.40},
|
2016-12-06 02:48:31 -08:00
|
|
|
uses = 40,
|
|
|
|
maxlevel = 3
|
2015-07-04 04:22:39 -07:00
|
|
|
},
|
2014-11-09 11:17:41 -08:00
|
|
|
},
|
2015-07-04 04:22:39 -07:00
|
|
|
damage_groups = {fleshy = 7},
|
2014-11-09 11:17:41 -08:00
|
|
|
},
|
2016-12-01 01:41:23 -08:00
|
|
|
sound = {breaks = "default_tool_breaks"},
|
2014-11-09 11:17:41 -08:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = 'ethereal:axe_crystal',
|
|
|
|
recipe = {
|
|
|
|
{'ethereal:crystal_ingot', 'ethereal:crystal_ingot'},
|
|
|
|
{'ethereal:crystal_ingot', 'default:steel_ingot'},
|
|
|
|
{'', 'default:steel_ingot'},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2016-12-01 01:41:23 -08:00
|
|
|
minetest.register_craft({
|
|
|
|
output = 'ethereal:axe_crystal',
|
|
|
|
recipe = {
|
|
|
|
{'ethereal:crystal_ingot', 'ethereal:crystal_ingot'},
|
|
|
|
{'default:steel_ingot', 'ethereal:crystal_ingot'},
|
|
|
|
{'default:steel_ingot', ''},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2014-11-09 11:17:41 -08:00
|
|
|
-- Crystal Pick (This will last a while)
|
|
|
|
minetest.register_tool("ethereal:pick_crystal", {
|
2016-06-09 07:08:34 -07:00
|
|
|
description = S("Crystal Pickaxe"),
|
2014-11-09 11:17:41 -08:00
|
|
|
inventory_image = "crystal_pick.png",
|
2015-11-23 12:43:48 -08:00
|
|
|
wield_image = "crystal_pick.png",
|
2014-11-09 11:17:41 -08:00
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 0.7,
|
2015-07-04 04:22:39 -07:00
|
|
|
max_drop_level = 3,
|
2014-11-09 11:17:41 -08:00
|
|
|
groupcaps={
|
2015-07-04 04:22:39 -07:00
|
|
|
cracky = {
|
|
|
|
times = {[1] = 1.8, [2] = 0.8, [3] = 0.40},
|
|
|
|
uses = 40,
|
|
|
|
maxlevel = 3
|
|
|
|
},
|
2014-11-09 11:17:41 -08:00
|
|
|
},
|
2016-12-06 02:48:31 -08:00
|
|
|
damage_groups = {fleshy = 6},
|
2014-11-09 11:17:41 -08:00
|
|
|
},
|
2016-12-01 01:41:23 -08:00
|
|
|
sound = {breaks = "default_tool_breaks"},
|
2014-11-09 11:17:41 -08:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:pick_crystal",
|
|
|
|
recipe = {
|
|
|
|
{"ethereal:crystal_ingot", "ethereal:crystal_ingot", "ethereal:crystal_ingot"},
|
|
|
|
{"", "default:steel_ingot", ""},
|
|
|
|
{"", "default:steel_ingot", ""},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Crystal Shovel (with Soft Touch so player can dig up dirt with grass intact)
|
|
|
|
minetest.register_tool("ethereal:shovel_crystal", {
|
2016-06-09 07:08:34 -07:00
|
|
|
description = S("Crystal (soft touch) Shovel"),
|
2014-11-09 11:17:41 -08:00
|
|
|
inventory_image = "crystal_shovel.png",
|
|
|
|
wield_image = "crystal_shovel.png^[transformR90",
|
2016-12-01 01:41:23 -08:00
|
|
|
sound = {breaks = "default_tool_breaks"},
|
2014-11-09 11:17:41 -08:00
|
|
|
on_use = function(itemstack, user, pointed_thing)
|
|
|
|
|
2016-01-21 06:59:28 -08:00
|
|
|
if pointed_thing.type ~= "node" then
|
|
|
|
return
|
|
|
|
end
|
2014-11-09 11:17:41 -08:00
|
|
|
|
|
|
|
-- Check if node protected
|
2016-01-21 06:59:28 -08:00
|
|
|
if minetest.is_protected(pointed_thing.under, user:get_player_name()) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local pos = pointed_thing.under
|
|
|
|
local nn = minetest.get_node(pos).name
|
|
|
|
|
|
|
|
-- Is node dirt, sand or gravel
|
|
|
|
if minetest.get_item_group(nn, "crumbly") > 0 then
|
|
|
|
|
|
|
|
local inv = user:get_inventory()
|
|
|
|
|
|
|
|
minetest.remove_node(pointed_thing.under)
|
2014-11-09 11:17:41 -08:00
|
|
|
|
2016-01-21 06:59:28 -08:00
|
|
|
nodeupdate(pos)
|
2014-11-09 11:17:41 -08:00
|
|
|
|
2016-12-07 02:56:30 -08:00
|
|
|
if minetest.setting_getbool("creative_mode") then
|
2016-12-01 01:41:23 -08:00
|
|
|
|
2016-12-07 02:56:30 -08:00
|
|
|
if not inv:contains_item("main", {name = nn}) then
|
|
|
|
inv:add_item("main", {name = nn})
|
|
|
|
end
|
|
|
|
else
|
|
|
|
|
|
|
|
inv:add_item("main", {name = nn})
|
2016-12-01 01:41:23 -08:00
|
|
|
itemstack:add_wear(65535 / 100) -- 111 uses
|
|
|
|
end
|
2014-11-09 11:17:41 -08:00
|
|
|
|
2016-12-07 02:56:30 -08:00
|
|
|
minetest.sound_play("default_dig_crumbly", {pos = pos, gain = 0.35})
|
2014-11-09 11:17:41 -08:00
|
|
|
|
2016-01-21 06:59:28 -08:00
|
|
|
return itemstack
|
2014-11-09 11:17:41 -08:00
|
|
|
end
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:shovel_crystal",
|
|
|
|
recipe = {
|
2016-05-17 13:40:05 -07:00
|
|
|
{"ethereal:crystal_ingot"},
|
|
|
|
{"default:steel_ingot"},
|
|
|
|
{"default:steel_ingot"},
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2015-07-04 04:22:39 -07:00
|
|
|
-- Crystal Gilly Staff (replenishes air supply when used)
|
2014-11-09 11:17:41 -08:00
|
|
|
minetest.register_tool("ethereal:crystal_gilly_staff", {
|
2016-06-09 07:08:34 -07:00
|
|
|
description = S("Crystal Gilly Staff"),
|
2014-11-09 11:17:41 -08:00
|
|
|
inventory_image = "crystal_gilly_staff.png",
|
|
|
|
wield_image = "crystal_gilly_staff.png",
|
|
|
|
|
|
|
|
on_use = function(itemstack, user, pointed_thing)
|
|
|
|
if user:get_breath() < 10 then
|
|
|
|
user:set_breath(10)
|
|
|
|
end
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2016-12-04 02:58:20 -08:00
|
|
|
type = "shapeless",
|
2014-11-09 11:17:41 -08:00
|
|
|
output = "ethereal:crystal_gilly_staff",
|
|
|
|
recipe = {
|
2016-12-04 02:58:20 -08:00
|
|
|
"ethereal:green_moss", "ethereal:gray_moss", "ethereal:fiery_moss",
|
|
|
|
"ethereal:crystal_moss", "ethereal:crystal_ingot", "ethereal:mushroom_moss",
|
|
|
|
"ethereal:crystal_ingot"
|
|
|
|
},
|
2016-01-10 10:43:29 -08:00
|
|
|
})
|