Add missing node sounds

This commit is contained in:
Wuzzy 2020-03-31 17:17:59 +02:00
parent 1497c74351
commit f82667b019
15 changed files with 47 additions and 12 deletions

View File

@ -48,6 +48,7 @@ minetest.register_node("bonfire:self", {
}, },
drop = "", drop = "",
groups = {crumbly=3, oddly_breakable_by_hand=1, not_in_creative_inventory=1}, groups = {crumbly=3, oddly_breakable_by_hand=1, not_in_creative_inventory=1},
sounds = default.node_sound_defaults(),
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("formspec", bonfire.formspec) meta:set_string("formspec", bonfire.formspec)
@ -99,6 +100,7 @@ minetest.register_node("bonfire:self_active", {
light_source = 12, light_source = 12,
drop = "", drop = "",
groups = {igniter=1,crumbly=3, not_in_creative_inventory=1,fires=1}, groups = {igniter=1,crumbly=3, not_in_creative_inventory=1,fires=1},
sounds = default.node_sound_defaults(),
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("formspec", bonfire.formspec) meta:set_string("formspec", bonfire.formspec)

View File

@ -156,6 +156,7 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
"bushes_basket_pie_"..bush_name..".png", "bushes_basket_pie_"..bush_name..".png",
"bushes_basket.png" "bushes_basket.png"
}, },
sounds = default.node_sound_defaults(),
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
on_use = minetest.item_eat(18), on_use = minetest.item_eat(18),
@ -206,6 +207,7 @@ minetest.register_node(":bushes:basket_empty", {
drawtype = "mesh", drawtype = "mesh",
mesh = "bushes_basket_empty.obj", mesh = "bushes_basket_empty.obj",
tiles = { "bushes_basket.png" }, tiles = { "bushes_basket.png" },
sounds = default.node_sound_defaults(),
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
groups = { dig_immediate = 3 }, groups = { dig_immediate = 3 },

View File

@ -5,6 +5,7 @@ minetest.register_node("concrete:concrete_block", {
paramtype = "light", paramtype = "light",
drop = "concrete:concrete_block", drop = "concrete:concrete_block",
groups = {cracky=1}, groups = {cracky=1},
sounds = default.node_sound_stone_defaults(),
}) })
realtest.register_stair("concrete:concrete_block",nil,nil,nil, realtest.register_stair("concrete:concrete_block",nil,nil,nil,
@ -21,6 +22,7 @@ minetest.register_node("concrete:concrete_stripe", {
paramtype = "light", paramtype = "light",
drop = "concrete:concrete_stripe", drop = "concrete:concrete_stripe",
groups = {cracky=1}, groups = {cracky=1},
sounds = default.node_sound_stone_defaults(),
}) })
realtest.register_stair("concrete:concrete_stripe",nil,nil,nil, realtest.register_stair("concrete:concrete_stripe",nil,nil,nil,

View File

@ -137,6 +137,7 @@ function realtest.register_slab(name, recipeitem, groups, images, description, s
description = description, description = description,
drawtype = "nodebox", drawtype = "nodebox",
groups = groups, groups = groups,
sounds = sounds,
tiles = images, tiles = images,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",

View File

@ -189,9 +189,9 @@ end
function default.node_sound_dirt_defaults(table) function default.node_sound_dirt_defaults(table)
table = table or {} table = table or {}
table.footstep = table.footstep or table.footstep = table.footstep or
{name="", gain=0.5} {name="default_grass_footstep", gain=0.5}
--table.dug = table.dug or table.place = table.place or
-- {name="default_dirt_break", gain=0.5} {name="default_place_node", gain=0.5}
default.node_sound_defaults(table) default.node_sound_defaults(table)
return table return table
end end
@ -200,10 +200,10 @@ function default.node_sound_sand_defaults(table)
table = table or {} table = table or {}
table.footstep = table.footstep or table.footstep = table.footstep or
{name="default_grass_footstep", gain=0.25} {name="default_grass_footstep", gain=0.25}
--table.dug = table.dug or
-- {name="default_dirt_break", gain=0.25}
table.dug = table.dug or table.dug = table.dug or
{name="", gain=0.25} {name="", gain=0.25}
table.place = table.place or
{name="default_place_node", gain=0.5}
default.node_sound_defaults(table) default.node_sound_defaults(table)
return table return table
end end
@ -223,7 +223,9 @@ function default.node_sound_leaves_defaults(table)
table.dig = table.dig or table.dig = table.dig or
{name="default_dig_crumbly", gain=0.4} {name="default_dig_crumbly", gain=0.4}
table.dug = table.dug or table.dug = table.dug or
{name="", gain=1.0} {name="default_dig_crumbly", gain=1.0}
table.place = table.place or
{name="default_place_node", gain=0.5}
default.node_sound_defaults(table) default.node_sound_defaults(table)
return table return table
end end
@ -232,8 +234,6 @@ function default.node_sound_glass_defaults(table)
table = table or {} table = table or {}
table.footstep = table.footstep or table.footstep = table.footstep or
{name="default_hard_footstep", gain=0.25} {name="default_hard_footstep", gain=0.25}
table.dug = table.dug or
{name="default_break_glass", gain=1.0}
default.node_sound_defaults(table) default.node_sound_defaults(table)
return table return table
end end

View File

@ -141,6 +141,7 @@ function doors:register_door(name, def)
fixed = def.selection_box_bottom fixed = def.selection_box_bottom
}, },
groups = def.groups, groups = def.groups,
sounds = def.sounds,
after_dig_node = function(pos, oldnode, oldmetadata, digger) after_dig_node = function(pos, oldnode, oldmetadata, digger)
pos.y = pos.y+1 pos.y = pos.y+1
@ -171,6 +172,7 @@ function doors:register_door(name, def)
fixed = def.selection_box_top fixed = def.selection_box_top
}, },
groups = def.groups, groups = def.groups,
sounds = def.sounds,
after_dig_node = function(pos, oldnode, oldmetadata, digger) after_dig_node = function(pos, oldnode, oldmetadata, digger)
pos.y = pos.y-1 pos.y = pos.y-1
@ -201,6 +203,7 @@ function doors:register_door(name, def)
fixed = def.selection_box_bottom fixed = def.selection_box_bottom
}, },
groups = def.groups, groups = def.groups,
sounds = def.sounds,
after_dig_node = function(pos, oldnode, oldmetadata, digger) after_dig_node = function(pos, oldnode, oldmetadata, digger)
pos.y = pos.y+1 pos.y = pos.y+1
@ -231,6 +234,7 @@ function doors:register_door(name, def)
fixed = def.selection_box_top fixed = def.selection_box_top
}, },
groups = def.groups, groups = def.groups,
sounds = def.sounds,
after_dig_node = function(pos, oldnode, oldmetadata, digger) after_dig_node = function(pos, oldnode, oldmetadata, digger)
pos.y = pos.y-1 pos.y = pos.y-1
@ -254,6 +258,7 @@ for i, tree_name in ipairs(realtest.registered_trees_list) do
description = tree.description, description = tree.description,
inventory_image = tree.textures.door_inventory, inventory_image = tree.textures.door_inventory,
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2}, groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2},
sounds = default.node_sound_wood_defaults(),
tiles_bottom = {tree.textures.door_bottom,tree.textures.door_bottom}, tiles_bottom = {tree.textures.door_bottom,tree.textures.door_bottom},
tiles_top = {tree.textures.door_top,tree.textures.door_top}, tiles_top = {tree.textures.door_top,tree.textures.door_top},
}) })
@ -279,6 +284,7 @@ for i=1, #metals.list do
description = metals.desc_list[i], description = metals.desc_list[i],
inventory_image = "metals_"..metals.list[i].."_block.png^doors_grey.png", inventory_image = "metals_"..metals.list[i].."_block.png^doors_grey.png",
groups = {snappy=1,cracky=2}, groups = {snappy=1,cracky=2},
sounds = default.node_sound_stone_defaults(),
tiles_bottom = {"metals_"..metals.list[i].."_block.png"}, tiles_bottom = {"metals_"..metals.list[i].."_block.png"},
tiles_top = {"metals_"..metals.list[i].."_block.png"}, tiles_top = {"metals_"..metals.list[i].."_block.png"},
}) })

View File

@ -46,6 +46,7 @@ for i=1,4 do
tiles = {"farming_seed_placed.png"}, tiles = {"farming_seed_placed.png"},
inventory_image = "farming_"..name.."_seed.png", inventory_image = "farming_"..name.."_seed.png",
groups = {snappy=3, plant=1, attached_node=1}, groups = {snappy=3, plant=1, attached_node=1},
sounds = default.node_sound_defaults(),
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
walkable = false, walkable = false,
@ -110,6 +111,7 @@ minetest.register_node("farming:soil", {
tiles = {"farming_soil.png", tiles = {"farming_soil.png",
"default_dirt.png"}, "default_dirt.png"},
groups = {crumbly=3}, groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults(),
paramtype = "light", paramtype = "light",
drop = "default:dirt", drop = "default:dirt",
}) })
@ -163,6 +165,7 @@ minetest.register_node("farming:cake", {
description = "CAKE!!!", description = "CAKE!!!",
tiles = {"farming_cake_top.png","farming_cake_base.png","farming_cake_side.png"}, tiles = {"farming_cake_top.png","farming_cake_base.png","farming_cake_side.png"},
groups = {crumbly=3}, groups = {crumbly=3},
sounds = default.node_sound_defaults(),
paramtype = "light", paramtype = "light",
drop = "farming:cake", drop = "farming:cake",
on_use=minetest.item_eat(16), on_use=minetest.item_eat(16),
@ -326,6 +329,7 @@ minetest.register_node("farming:rope",{
inventory_image = "farming_rope_inv.png", inventory_image = "farming_rope_inv.png",
wield_image = "farming_rope_inv.png", wield_image = "farming_rope_inv.png",
groups = {choppy=3,snappy=3,oddly_breakable_by_hand=3,flammable=1}, groups = {choppy=3,snappy=3,oddly_breakable_by_hand=3,flammable=1},
sounds = default.node_sound_defaults(),
paramtype = "light", paramtype = "light",
climbable = true, climbable = true,
walkable = false, walkable = false,
@ -386,6 +390,7 @@ minetest.register_node("farming:ant_hill",{
sunlight_propagates = true, sunlight_propagates = true,
tiles = {"farming_anthill.png"}, tiles = {"farming_anthill.png"},
groups = {oddly_breakable_by_hand=3,not_in_creative_inventory=1}, groups = {oddly_breakable_by_hand=3,not_in_creative_inventory=1},
sounds = default.node_sound_dirt_defaults(),
paramtype = "light", paramtype = "light",
drop = { drop = {
max_items = 2, max_items = 2,

View File

@ -59,6 +59,7 @@ for j, tree_name in ipairs(realtest.registered_trees_list) do
tiles = {tree.textures.planks}, tiles = {tree.textures.planks},
paramtype = "light", paramtype = "light",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,drop_on_dig=1,fence=1,material=j}, groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,drop_on_dig=1,fence=1,material=j},
sounds = default.node_sound_wood_defaults(),
sunlight_propagates = true, sunlight_propagates = true,
drop = "fences:"..tree.name:remove_modname_prefix().."_fence", drop = "fences:"..tree.name:remove_modname_prefix().."_fence",
node_box = { node_box = {
@ -79,6 +80,7 @@ for j, tree_name in ipairs(realtest.registered_trees_list) do
tiles = {tree.textures.planks}, tiles = {tree.textures.planks},
paramtype = "light", paramtype = "light",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,drop_on_dig=1,fence=1,material=j}, groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,drop_on_dig=1,fence=1,material=j},
sounds = default.node_sound_wood_defaults(),
sunlight_propagates = true, sunlight_propagates = true,
node_box = { node_box = {
type = "fixed", type = "fixed",

View File

@ -15,7 +15,7 @@ minetest.register_node("grounds:clay", {
is_ground_content = true, is_ground_content = true,
groups = {crumbly=3}, groups = {crumbly=3},
drop = 'default:clay_lump 4', drop = 'default:clay_lump 4',
sounds = default.node_sound_dirt_defaults(), sounds = default.node_sound_sand_defaults(),
}) })
minetest.register_ore({ minetest.register_ore({

View File

@ -26,6 +26,12 @@ function hatches.register_hatch(name, desc, is_wooden)
else else
texture = "metals_"..name.."_block.png" texture = "metals_"..name.."_block.png"
end end
local sounds
if is_wooden then
sounds = default.node_sound_wood_defaults()
else
sounds = default.node_sound_stone_defaults()
end
minetest.register_node("hatches:"..name.."_hatch_opened_top", { minetest.register_node("hatches:"..name.."_hatch_opened_top", {
drawtype = "nodebox", drawtype = "nodebox",
@ -35,6 +41,7 @@ function hatches.register_hatch(name, desc, is_wooden)
is_ground_content = true, is_ground_content = true,
climbable = true, climbable = true,
groups = {choppy=2, dig_immediate=2}, groups = {choppy=2, dig_immediate=2},
sounds = sounds,
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
@ -67,6 +74,7 @@ function hatches.register_hatch(name, desc, is_wooden)
paramtype2 = "facedir", paramtype2 = "facedir",
is_ground_content = true, is_ground_content = true,
groups = {choppy=2, dig_immediate=2}, groups = {choppy=2, dig_immediate=2},
sounds = sounds,
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
@ -96,6 +104,7 @@ function hatches.register_hatch(name, desc, is_wooden)
is_ground_content = true, is_ground_content = true,
climbable = true, climbable = true,
groups = {choppy=2, dig_immediate=2}, groups = {choppy=2, dig_immediate=2},
sounds = sounds,
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {

View File

@ -0,0 +1 @@
default

View File

@ -5,6 +5,7 @@ minetest.register_node("light:streetlight", {
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
light_source = 14, light_source = 14,
sounds = default.node_sound_glass_defaults(),
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
@ -15,8 +16,8 @@ minetest.register_node("light:streetlight", {
groups = {choppy=2,dig_immediate=3,flammable=1}, groups = {choppy=2,dig_immediate=3,flammable=1},
}) })
metals = {"pig_iron", "bronze"} local metals = {"pig_iron", "bronze"}
fuels = {"charcoal", "anthracite", "bituminous_coal", "lignite"} local fuels = {"charcoal", "anthracite", "bituminous_coal", "lignite"}
for _, metal in ipairs(metals) do for _, metal in ipairs(metals) do
for _, fuel in ipairs(fuels) do for _, fuel in ipairs(fuels) do
@ -29,4 +30,4 @@ for _, metal in ipairs(metals) do
} }
}) })
end end
end end

View File

@ -196,6 +196,7 @@ minetest.register_node("ores:sulfur", {
particle_image = {"minerals_sulfur.png"}, particle_image = {"minerals_sulfur.png"},
paramtype = "light", paramtype = "light",
groups = {cracky=3,drop_on_dig=1,dig_immediate=2}, groups = {cracky=3,drop_on_dig=1,dig_immediate=2},
sounds = default.node_sound_stone_defaults(),
drop = { drop = {
max_items = 1, max_items = 1,
items = { items = {

View File

@ -18,6 +18,7 @@ minetest.register_node("windmill:windmill_farm", {
--wall_side = <default> --wall_side = <default>
}, },
groups = {choppy=2,dig_immediate=2}, groups = {choppy=2,dig_immediate=2},
sounds = default.node_sound_wood_defaults(),
}) })
minetest.register_node("windmill:windmill_wooden", { minetest.register_node("windmill:windmill_wooden", {
@ -40,6 +41,7 @@ minetest.register_node("windmill:windmill_wooden", {
--wall_side = <default> --wall_side = <default>
}, },
groups = {choppy=2,dig_immediate=2}, groups = {choppy=2,dig_immediate=2},
sounds = default.node_sound_wood_defaults(),
}) })
for _, tree in pairs(realtest.registered_trees) do for _, tree in pairs(realtest.registered_trees) do

View File

@ -93,6 +93,7 @@ minetest.register_node("xpanes:pane", {
inventory_image = "xpanes_pane.png", inventory_image = "xpanes_pane.png",
wield_image = "xpanes_pane.png", wield_image = "xpanes_pane.png",
node_placement_prediction = "", node_placement_prediction = "",
sounds = default.node_sound_glass_defaults(),
on_construct = update_pane on_construct = update_pane
}) })