summaryrefslogtreecommitdiff
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
parent06495be4a079c780f2be6f5099475852913fb0ef (diff)
code tweaks and additions (thanks RQWorldblender)
-rw-r--r--crystal.lua28
-rw-r--r--dirt.lua8
-rw-r--r--extra.lua7
-rw-r--r--init.lua4
-rw-r--r--schematics/bamboo_tree.lua11
-rw-r--r--water.lua15
6 files changed, 56 insertions, 17 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})
diff --git a/dirt.lua b/dirt.lua
index 3bb14ef..17d02b0 100644
--- a/dirt.lua
+++ b/dirt.lua
@@ -20,7 +20,9 @@ minetest.register_node("ethereal:green_dirt", {
wet = "farming:soil_wet"
},
drop = "default:dirt",
- sounds = default.node_sound_dirt_defaults()
+ sounds = default.node_sound_dirt_defaults({
+ footstep = {name = "default_grass_footstep", gain = 0.25},
+ }),
})
-- dry dirt
@@ -29,7 +31,9 @@ minetest.register_node("ethereal:dry_dirt", {
tiles = {"ethereal_dry_dirt.png"},
is_ground_content = ethereal.cavedirt,
groups = {crumbly = 3},
- sounds = default.node_sound_dirt_defaults()
+ sounds = default.node_sound_dirt_defaults({
+ footstep = {name = "default_grass_footstep", gain = 0.25},
+ }),
})
minetest.register_craft({
diff --git a/extra.lua b/extra.lua
index 8922fc8..b8a4bc0 100644
--- a/extra.lua
+++ b/extra.lua
@@ -163,9 +163,9 @@ minetest.register_node("ethereal:stone_ladder", {
minetest.register_craft({
output = "ethereal:stone_ladder 4",
recipe = {
- {"default:cobble", "", "default:cobble"},
- {"default:cobble", "default:cobble", "default:cobble"},
- {"default:cobble", "", "default:cobble"},
+ {"group:stone", "", "group:stone"},
+ {"group:stone", "group:stone", "group:stone"},
+ {"group:stone", "", "group:stone"},
}
})
@@ -262,6 +262,7 @@ minetest.register_tool("ethereal:light_staff", {
description = S("Staff of Light"),
inventory_image = "light_staff.png",
wield_image = "light_staff.png",
+ sound = {breaks = "default_tool_breaks"},
stack_max = 1,
on_use = function(itemstack, user, pointed_thing)
diff --git a/init.lua b/init.lua
index 21878a8..dddd4b1 100644
--- a/init.lua
+++ b/init.lua
@@ -1,6 +1,6 @@
--[[
- Minetest Ethereal Mod (24th November 2016)
+ Minetest Ethereal Mod (1st December 2016)
Created by ChinChow
@@ -12,6 +12,8 @@ ethereal = {}
ethereal.leaftype = 0 -- 0 for 2D plantlike, 1 for 3D allfaces
ethereal.leafwalk = false -- true for walkable leaves, false to fall through
ethereal.cavedirt = true -- caves chop through dirt when true
+ethereal.torchdrop = true -- torches drop when touching water
+ethereal.papyruswalk = true -- papyrus can be walked on
-- Set following to 1 to enable biome or 0 to disable
ethereal.glacier = 1 -- Ice glaciers with snow
diff --git a/schematics/bamboo_tree.lua b/schematics/bamboo_tree.lua
index da74125..15709da 100644
--- a/schematics/bamboo_tree.lua
+++ b/schematics/bamboo_tree.lua
@@ -76,7 +76,10 @@ ethereal.bambootree = {
},
}
-minetest.override_item("default:papyrus", {
- walkable = true,
- sunlight_propagates = true
-})
+if ethereal.papyruswalk == true then
+
+ minetest.override_item("default:papyrus", {
+ walkable = true,
+ sunlight_propagates = true
+ })
+end
diff --git a/water.lua b/water.lua
index c62bfeb..f5a6e24 100644
--- a/water.lua
+++ b/water.lua
@@ -29,8 +29,9 @@ minetest.register_node("ethereal:snowbrick", {
is_ground_content = false,
groups = {crumbly = 3, melts = 1},
sounds = default.node_sound_dirt_defaults({
- footstep = {name="default_snow_footstep", gain = 0.25},
- dug = {name="default_snow_footstep", gain = 0.75},
+ footstep = {name = "default_snow_footstep", gain = 0.15},
+ dug = {name = "default_snow_footstep", gain = 0.2},
+ dig = {name = "default_snow_footstep", gain = 0.2},
}),
})
@@ -121,10 +122,12 @@ minetest.register_abm({
end,
})
--- If torch touching water then drop as item
+-- If torch touching water then drop as item (when enabled)
+if ethereal.torchdrop == true then
+
minetest.register_abm({
label = "Ethereal drop torch",
- nodenames = {"default:torch"},
+ nodenames = {"default:torch", "group:torch"}, -- group:torch for new 3d torches
neighbors = {"group:water"},
interval = 5,
chance = 1,
@@ -150,7 +153,9 @@ minetest.register_abm({
minetest.swap_node(pos, {name = "air"})
- minetest.add_item(pos, {name = node.name})
+ minetest.add_item(pos, {name = "default:torch"})
end
end,
})
+
+end