diff --git a/mods/bonfire/init.lua b/mods/bonfire/init.lua index 562c6c0..15e8709 100644 --- a/mods/bonfire/init.lua +++ b/mods/bonfire/init.lua @@ -48,6 +48,7 @@ minetest.register_node("bonfire:self", { }, drop = "", groups = {crumbly=3, oddly_breakable_by_hand=1, not_in_creative_inventory=1}, + sounds = default.node_sound_defaults(), on_construct = function(pos) local meta = minetest.get_meta(pos) meta:set_string("formspec", bonfire.formspec) @@ -99,6 +100,7 @@ minetest.register_node("bonfire:self_active", { light_source = 12, drop = "", groups = {igniter=1,crumbly=3, not_in_creative_inventory=1,fires=1}, + sounds = default.node_sound_defaults(), on_construct = function(pos) local meta = minetest.get_meta(pos) meta:set_string("formspec", bonfire.formspec) diff --git a/mods/bushes_classic/nodes.lua b/mods/bushes_classic/nodes.lua index 0a0446f..da18a59 100644 --- a/mods/bushes_classic/nodes.lua +++ b/mods/bushes_classic/nodes.lua @@ -156,6 +156,7 @@ for i, bush_name in ipairs(bushes_classic.bushes) do "bushes_basket_pie_"..bush_name..".png", "bushes_basket.png" }, + sounds = default.node_sound_defaults(), paramtype = "light", paramtype2 = "facedir", on_use = minetest.item_eat(18), @@ -206,6 +207,7 @@ minetest.register_node(":bushes:basket_empty", { drawtype = "mesh", mesh = "bushes_basket_empty.obj", tiles = { "bushes_basket.png" }, + sounds = default.node_sound_defaults(), paramtype = "light", paramtype2 = "facedir", groups = { dig_immediate = 3 }, diff --git a/mods/concrete/init.lua b/mods/concrete/init.lua index e08722c..0e33b37 100644 --- a/mods/concrete/init.lua +++ b/mods/concrete/init.lua @@ -5,6 +5,7 @@ minetest.register_node("concrete:concrete_block", { paramtype = "light", drop = "concrete:concrete_block", groups = {cracky=1}, + sounds = default.node_sound_stone_defaults(), }) realtest.register_stair("concrete:concrete_block",nil,nil,nil, @@ -21,6 +22,7 @@ minetest.register_node("concrete:concrete_stripe", { paramtype = "light", drop = "concrete:concrete_stripe", groups = {cracky=1}, + sounds = default.node_sound_stone_defaults(), }) realtest.register_stair("concrete:concrete_stripe",nil,nil,nil, diff --git a/mods/core/stairs_and_slabs.lua b/mods/core/stairs_and_slabs.lua index fc81ad0..ef8abbd 100644 --- a/mods/core/stairs_and_slabs.lua +++ b/mods/core/stairs_and_slabs.lua @@ -137,6 +137,7 @@ function realtest.register_slab(name, recipeitem, groups, images, description, s description = description, drawtype = "nodebox", groups = groups, + sounds = sounds, tiles = images, paramtype = "light", paramtype2 = "facedir", diff --git a/mods/default/init.lua b/mods/default/init.lua index bc73736..641bf46 100644 --- a/mods/default/init.lua +++ b/mods/default/init.lua @@ -189,9 +189,9 @@ end function default.node_sound_dirt_defaults(table) table = table or {} table.footstep = table.footstep or - {name="", gain=0.5} - --table.dug = table.dug or - -- {name="default_dirt_break", gain=0.5} + {name="default_grass_footstep", gain=0.5} + table.place = table.place or + {name="default_place_node", gain=0.5} default.node_sound_defaults(table) return table end @@ -200,10 +200,10 @@ function default.node_sound_sand_defaults(table) table = table or {} table.footstep = table.footstep or {name="default_grass_footstep", gain=0.25} - --table.dug = table.dug or - -- {name="default_dirt_break", gain=0.25} table.dug = table.dug or {name="", gain=0.25} + table.place = table.place or + {name="default_place_node", gain=0.5} default.node_sound_defaults(table) return table end @@ -223,7 +223,9 @@ function default.node_sound_leaves_defaults(table) table.dig = table.dig or {name="default_dig_crumbly", gain=0.4} 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) return table end @@ -232,8 +234,6 @@ function default.node_sound_glass_defaults(table) table = table or {} table.footstep = table.footstep or {name="default_hard_footstep", gain=0.25} - table.dug = table.dug or - {name="default_break_glass", gain=1.0} default.node_sound_defaults(table) return table end diff --git a/mods/doors/init.lua b/mods/doors/init.lua index 4ef6ce0..d47f980 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -141,6 +141,7 @@ function doors:register_door(name, def) fixed = def.selection_box_bottom }, groups = def.groups, + sounds = def.sounds, after_dig_node = function(pos, oldnode, oldmetadata, digger) pos.y = pos.y+1 @@ -171,6 +172,7 @@ function doors:register_door(name, def) fixed = def.selection_box_top }, groups = def.groups, + sounds = def.sounds, after_dig_node = function(pos, oldnode, oldmetadata, digger) pos.y = pos.y-1 @@ -201,6 +203,7 @@ function doors:register_door(name, def) fixed = def.selection_box_bottom }, groups = def.groups, + sounds = def.sounds, after_dig_node = function(pos, oldnode, oldmetadata, digger) pos.y = pos.y+1 @@ -231,6 +234,7 @@ function doors:register_door(name, def) fixed = def.selection_box_top }, groups = def.groups, + sounds = def.sounds, after_dig_node = function(pos, oldnode, oldmetadata, digger) pos.y = pos.y-1 @@ -254,6 +258,7 @@ for i, tree_name in ipairs(realtest.registered_trees_list) do description = tree.description, inventory_image = tree.textures.door_inventory, 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_top = {tree.textures.door_top,tree.textures.door_top}, }) @@ -279,6 +284,7 @@ for i=1, #metals.list do description = metals.desc_list[i], inventory_image = "metals_"..metals.list[i].."_block.png^doors_grey.png", groups = {snappy=1,cracky=2}, + sounds = default.node_sound_stone_defaults(), tiles_bottom = {"metals_"..metals.list[i].."_block.png"}, tiles_top = {"metals_"..metals.list[i].."_block.png"}, }) diff --git a/mods/farming/init.lua b/mods/farming/init.lua index 12dc2c9..087b213 100644 --- a/mods/farming/init.lua +++ b/mods/farming/init.lua @@ -46,6 +46,7 @@ for i=1,4 do tiles = {"farming_seed_placed.png"}, inventory_image = "farming_"..name.."_seed.png", groups = {snappy=3, plant=1, attached_node=1}, + sounds = default.node_sound_defaults(), paramtype = "light", sunlight_propagates = true, walkable = false, @@ -110,6 +111,7 @@ minetest.register_node("farming:soil", { tiles = {"farming_soil.png", "default_dirt.png"}, groups = {crumbly=3}, + sounds = default.node_sound_dirt_defaults(), paramtype = "light", drop = "default:dirt", }) @@ -163,6 +165,7 @@ minetest.register_node("farming:cake", { description = "CAKE!!!", tiles = {"farming_cake_top.png","farming_cake_base.png","farming_cake_side.png"}, groups = {crumbly=3}, + sounds = default.node_sound_defaults(), paramtype = "light", drop = "farming:cake", on_use=minetest.item_eat(16), @@ -326,6 +329,7 @@ minetest.register_node("farming:rope",{ inventory_image = "farming_rope_inv.png", wield_image = "farming_rope_inv.png", groups = {choppy=3,snappy=3,oddly_breakable_by_hand=3,flammable=1}, + sounds = default.node_sound_defaults(), paramtype = "light", climbable = true, walkable = false, @@ -386,6 +390,7 @@ minetest.register_node("farming:ant_hill",{ sunlight_propagates = true, tiles = {"farming_anthill.png"}, groups = {oddly_breakable_by_hand=3,not_in_creative_inventory=1}, + sounds = default.node_sound_dirt_defaults(), paramtype = "light", drop = { max_items = 2, diff --git a/mods/fences/init.lua b/mods/fences/init.lua index f8c7f9d..2749caf 100644 --- a/mods/fences/init.lua +++ b/mods/fences/init.lua @@ -59,6 +59,7 @@ for j, tree_name in ipairs(realtest.registered_trees_list) do tiles = {tree.textures.planks}, paramtype = "light", 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, drop = "fences:"..tree.name:remove_modname_prefix().."_fence", node_box = { @@ -79,6 +80,7 @@ for j, tree_name in ipairs(realtest.registered_trees_list) do tiles = {tree.textures.planks}, paramtype = "light", 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, node_box = { type = "fixed", diff --git a/mods/grounds/init.lua b/mods/grounds/init.lua index 1afcf42..3358b4d 100644 --- a/mods/grounds/init.lua +++ b/mods/grounds/init.lua @@ -15,7 +15,7 @@ minetest.register_node("grounds:clay", { is_ground_content = true, groups = {crumbly=3}, drop = 'default:clay_lump 4', - sounds = default.node_sound_dirt_defaults(), + sounds = default.node_sound_sand_defaults(), }) minetest.register_ore({ diff --git a/mods/hatches/init.lua b/mods/hatches/init.lua index 32efaa9..8e2ad60 100755 --- a/mods/hatches/init.lua +++ b/mods/hatches/init.lua @@ -26,6 +26,12 @@ function hatches.register_hatch(name, desc, is_wooden) else texture = "metals_"..name.."_block.png" 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", { drawtype = "nodebox", @@ -35,6 +41,7 @@ function hatches.register_hatch(name, desc, is_wooden) is_ground_content = true, climbable = true, groups = {choppy=2, dig_immediate=2}, + sounds = sounds, node_box = { type = "fixed", fixed = { @@ -67,6 +74,7 @@ function hatches.register_hatch(name, desc, is_wooden) paramtype2 = "facedir", is_ground_content = true, groups = {choppy=2, dig_immediate=2}, + sounds = sounds, node_box = { type = "fixed", fixed = { @@ -96,6 +104,7 @@ function hatches.register_hatch(name, desc, is_wooden) is_ground_content = true, climbable = true, groups = {choppy=2, dig_immediate=2}, + sounds = sounds, node_box = { type = "fixed", fixed = { diff --git a/mods/light/depends.txt b/mods/light/depends.txt index e69de29..4ad96d5 100644 --- a/mods/light/depends.txt +++ b/mods/light/depends.txt @@ -0,0 +1 @@ +default diff --git a/mods/light/init.lua b/mods/light/init.lua index 46a46a1..8cad85d 100644 --- a/mods/light/init.lua +++ b/mods/light/init.lua @@ -5,6 +5,7 @@ minetest.register_node("light:streetlight", { paramtype = "light", sunlight_propagates = true, light_source = 14, + sounds = default.node_sound_glass_defaults(), node_box = { type = "fixed", fixed = { @@ -15,8 +16,8 @@ minetest.register_node("light:streetlight", { groups = {choppy=2,dig_immediate=3,flammable=1}, }) -metals = {"pig_iron", "bronze"} -fuels = {"charcoal", "anthracite", "bituminous_coal", "lignite"} +local metals = {"pig_iron", "bronze"} +local fuels = {"charcoal", "anthracite", "bituminous_coal", "lignite"} for _, metal in ipairs(metals) do for _, fuel in ipairs(fuels) do @@ -29,4 +30,4 @@ for _, metal in ipairs(metals) do } }) end -end \ No newline at end of file +end diff --git a/mods/ores/registration.lua b/mods/ores/registration.lua index 1af3804..f1a28db 100644 --- a/mods/ores/registration.lua +++ b/mods/ores/registration.lua @@ -196,6 +196,7 @@ minetest.register_node("ores:sulfur", { particle_image = {"minerals_sulfur.png"}, paramtype = "light", groups = {cracky=3,drop_on_dig=1,dig_immediate=2}, + sounds = default.node_sound_stone_defaults(), drop = { max_items = 1, items = { diff --git a/mods/windmill/init.lua b/mods/windmill/init.lua index af7fd77..2acb914 100644 --- a/mods/windmill/init.lua +++ b/mods/windmill/init.lua @@ -18,6 +18,7 @@ minetest.register_node("windmill:windmill_farm", { --wall_side = }, groups = {choppy=2,dig_immediate=2}, + sounds = default.node_sound_wood_defaults(), }) minetest.register_node("windmill:windmill_wooden", { @@ -40,6 +41,7 @@ minetest.register_node("windmill:windmill_wooden", { --wall_side = }, groups = {choppy=2,dig_immediate=2}, + sounds = default.node_sound_wood_defaults(), }) for _, tree in pairs(realtest.registered_trees) do diff --git a/mods/xpanes/init.lua b/mods/xpanes/init.lua index 49a4b1f..968771c 100644 --- a/mods/xpanes/init.lua +++ b/mods/xpanes/init.lua @@ -93,6 +93,7 @@ minetest.register_node("xpanes:pane", { inventory_image = "xpanes_pane.png", wield_image = "xpanes_pane.png", node_placement_prediction = "", + sounds = default.node_sound_glass_defaults(), on_construct = update_pane })