unknown 2022-02-27 10:44:38 -05:00
parent 87bd12dd0f
commit 6956e49e77
2 changed files with 33 additions and 2 deletions

View File

@ -1,3 +1,5 @@
read_globals = { read_globals = {
"minetest", "mcl_sounds", "default", "ks_sounds", "nodes_nature", "fl_stone", "fl_topsoil", "fl_trees", "minetest", "mcl_sounds", "default", "ks_sounds",
"nodes_nature", "fl_stone", "fl_topsoil", "fl_trees",
"hades_sounds",
} }

View File

@ -56,6 +56,8 @@ function sound_api.node_sound_default(table)
return ks.node_sound_default(table) return ks.node_sound_default(table)
elseif minetest.get_modpath("nodes_nature") then elseif minetest.get_modpath("nodes_nature") then
return nodes_nature.node_sound_default(table) return nodes_nature.node_sound_default(table)
elseif minetest.get_modpath("hades_sounds") then
return hades_sounds.node_sound_defaults(table)
else else
return table return table
end end
@ -70,6 +72,8 @@ function sound_api.node_sound_stone_defaults(table)
return nodes_nature.node_sound_stone_defaults(table) return nodes_nature.node_sound_stone_defaults(table)
elseif minetest.get_modpath("fl_stone") then elseif minetest.get_modpath("fl_stone") then
return fl_stone.sounds.stone(table) return fl_stone.sounds.stone(table)
elseif minetest.get_modpath("hades_sounds") then
return hades_sounds.node_sound_stone_defaults(table)
else else
return table return table
end end
@ -85,6 +89,8 @@ function sound_api.node_sound_dirt_defaults(table)
--s/dirt/grass --s/dirt/grass
elseif minetest.get_modpath("fl_topsoil") then elseif minetest.get_modpath("fl_topsoil") then
return fl_topsoil.sounds.grass(table) return fl_topsoil.sounds.grass(table)
elseif minetest.get_modpath("hades_sounds") then
return hades_sounds.node_sound_dirt_defaults(table)
else else
return table return table
end end
@ -92,7 +98,11 @@ end
--return dirt as some games use dirt vs grass --return dirt as some games use dirt vs grass
function sound_api.node_sound_grass_defaults(table) function sound_api.node_sound_grass_defaults(table)
return sound_api.node_sound_dirt_defaults(table) if minetest.get_modpath("hades_sounds") then
return hades_sounds.node_sound_grass_defaults(table)
else
return sound_api.node_sound_dirt_defaults(table)
end
end end
function sound_api.node_sound_sand_defaults(table) function sound_api.node_sound_sand_defaults(table)
@ -104,6 +114,8 @@ function sound_api.node_sound_sand_defaults(table)
return nodes_nature.node_sound_sand_defaults(table) return nodes_nature.node_sound_sand_defaults(table)
elseif minetest.get_modpath("fl_stone") then elseif minetest.get_modpath("fl_stone") then
return fl_stone.sounds.sand(table) return fl_stone.sounds.sand(table)
elseif minetest.get_modpath("hades_sounds") then
return hades_sounds.node_sound_sand_defaults(table)
else else
return table return table
end end
@ -119,6 +131,8 @@ function sound_api.node_sound_gravel_defaults(table)
return nodes_nature.node_sound_gravel_defaults(table) return nodes_nature.node_sound_gravel_defaults(table)
elseif minetest.get_modpath("fl_topsoil") then elseif minetest.get_modpath("fl_topsoil") then
return fl_topsoil.sounds.gravel(table) return fl_topsoil.sounds.gravel(table)
elseif minetest.get_modpath("hades_sounds") then
return hades_sounds.node_sound_gravel_defaults(table)
else else
return table return table
end end
@ -135,6 +149,8 @@ function sound_api.node_sound_wood_defaults(table)
return nodes_nature.node_sound_wood_defaults(table) return nodes_nature.node_sound_wood_defaults(table)
elseif minetest.get_modpath("fl_trees") then elseif minetest.get_modpath("fl_trees") then
return fl_trees.sounds.wood(table) return fl_trees.sounds.wood(table)
elseif minetest.get_modpath("hades_sounds") then
return hades_sounds.node_sound_wood_defaults(table)
else else
return table return table
end end
@ -149,6 +165,8 @@ function sound_api.node_sound_leaves_defaults(table)
return ks.node_sound_leaves_default(table) return ks.node_sound_leaves_default(table)
elseif minetest.get_modpath("nodes_nature") then elseif minetest.get_modpath("nodes_nature") then
return nodes_nature.node_sound_leaves_defaults(table) return nodes_nature.node_sound_leaves_defaults(table)
elseif minetest.get_modpath("hades_sounds") then
return hades_sounds.node_sound_leaves_defaults(table)
else else
return table return table
end end
@ -161,6 +179,8 @@ function sound_api.node_sound_glass_defaults(table)
return mcl_sounds.node_sound_glass_defaults(table) return mcl_sounds.node_sound_glass_defaults(table)
elseif minetest.get_modpath("nodes_nature") then elseif minetest.get_modpath("nodes_nature") then
return nodes_nature.node_sound_glass_defaults(table) return nodes_nature.node_sound_glass_defaults(table)
elseif minetest.get_modpath("hades_sounds") then
return hades_sounds.node_sound_glass_defaults(table)
else else
return table return table
end end
@ -176,6 +196,9 @@ function sound_api.node_sound_ice_defaults(table)
--s/ice/glass --s/ice/glass
elseif minetest.get_modpath("nodes_nature") then elseif minetest.get_modpath("nodes_nature") then
return nodes_nature.node_sound_glass_defaults(table) return nodes_nature.node_sound_glass_defaults(table)
--s/ice/glass
elseif minetest.get_modpath("hades_sounds") then
return hades_sounds.node_sound_glass_defaults(table)
else else
return table return table
end end
@ -186,6 +209,8 @@ function sound_api.node_sound_metal_defaults(table)
return default.node_sound_metal_defaults(table) return default.node_sound_metal_defaults(table)
elseif minetest.get_modpath("mcl_sounds") then elseif minetest.get_modpath("mcl_sounds") then
return mcl_sounds.node_sound_metal_defaults(table) return mcl_sounds.node_sound_metal_defaults(table)
elseif minetest.get_modpath("hades_sounds") then
return hades_sounds.node_sound_metal_defaults(table)
else else
return table return table
end end
@ -198,6 +223,8 @@ function sound_api.node_sound_water_defaults(table)
return mcl_sounds.node_sound_water_defaults(table) return mcl_sounds.node_sound_water_defaults(table)
elseif minetest.get_modpath("nodes_nature") then elseif minetest.get_modpath("nodes_nature") then
return nodes_nature.node_sound_water_defaults(table) return nodes_nature.node_sound_water_defaults(table)
elseif minetest.get_modpath("hades_sounds") then
return hades_sounds.node_sound_water_defaults(table)
else else
return table return table
end end
@ -212,6 +239,8 @@ function sound_api.node_sound_lava_defaults(table)
--s/lava/water --s/lava/water
elseif minetest.get_modpath("nodes_nature") then elseif minetest.get_modpath("nodes_nature") then
return nodes_nature.node_sound_water_defaults(table) return nodes_nature.node_sound_water_defaults(table)
elseif minetest.get_modpath("hades_sounds") then
return hades_sounds.node_sound_lava_defaults(table)
else else
return table return table
end end