code tweaks and additions (thanks RQWorldblender)

master
TenPlus1 2016-12-01 09:41:23 +00:00
parent 06495be4a0
commit 8309e6a777
6 changed files with 56 additions and 17 deletions

View File

@ -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})

View File

@ -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({

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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