diff --git a/src/commands.lua b/src/commands.lua index 299aed0..bee2d11 100644 --- a/src/commands.lua +++ b/src/commands.lua @@ -12,6 +12,13 @@ for _, texture in ipairs(textures_list) do textures[gameid] = dofile(xcompat.modpath.."/src/textures/"..texture) end +local sounds_list = minetest.get_dir_list(xcompat.modpath.."/src/sounds", false) +local sounds = {} +for _, sound in ipairs(sounds_list) do + local gameid = sound:sub(1, -5) + sounds[gameid] = dofile(xcompat.modpath.."/src/sounds/"..sound) +end + minetest.register_chatcommand("xcompat_test_materials", { description = "Test materials", privs = {server=true}, @@ -48,4 +55,22 @@ minetest.register_chatcommand("xcompat_test_textures", { minetest.chat_send_player(name, "Textures test complete") end +}) + +minetest.register_chatcommand("xcompat_test_sounds", { + description = "Test sounds", + privs = {server=true}, + func = function(name, _) + local reference_sounds = sounds["xcompat_agnostic"] + + for gameid, game_sounds in pairs(sounds) do + for sound, _ in pairs(reference_sounds) do + if not game_sounds[sound] then + minetest.chat_send_player(name, "Missing material: "..sound.." in game: "..gameid) + end + end + end + + minetest.chat_send_player(name, "Sounds test complete") + end }) \ No newline at end of file diff --git a/src/sounds.lua b/src/sounds.lua index 7c64487..a871259 100644 --- a/src/sounds.lua +++ b/src/sounds.lua @@ -1,297 +1,8 @@ -local sound_api = {} +local filename = xcompat.gameid ---convert some games for api usage - ---ks_sounds conversion ---currently loggy and bedrock are ignored -local ks = {} - -function ks.node_sound_defaults(soundtable) - soundtable = soundtable or {} - soundtable.footstep = soundtable.footstep or ks_sounds.generalnode_sounds.footstep - soundtable.dug = soundtable.dug or ks_sounds.generalnode_sounds.dug - soundtable.dig = soundtable.dig or ks_sounds.generalnode_sounds.dig - soundtable.place = soundtable.place or ks_sounds.generalnode_sounds.place - return soundtable +--if we dont have a materials file for the game, use minetest +if not xcompat.utilities.file_exists(xcompat.modpath .. "/src/sounds/" .. filename .. ".lua") then + filename = "xcompat_agnostic" end -function ks.node_sound_wood_defaults(soundtable) - soundtable = soundtable or {} - soundtable.footstep = soundtable.footstep or ks_sounds.woodennode_sounds.footstep - soundtable.dug = soundtable.dug or ks_sounds.woodennode_sounds.dug - soundtable.dig = soundtable.dig or ks_sounds.woodennode_sounds.dig - soundtable.place = soundtable.place or ks_sounds.woodennode_sounds.place - ks.node_sound_defaults(soundtable) - return soundtable -end - -function ks.node_sound_leaves_defaults(soundtable) - soundtable = soundtable or {} - soundtable.footstep = soundtable.footstep or ks_sounds.leafynode_sounds.footstep - soundtable.dug = soundtable.dug or ks_sounds.leafynode_sounds.dug - soundtable.dig = soundtable.dig or ks_sounds.leafynode_sounds.dig - soundtable.place = soundtable.place or ks_sounds.leafynode_sounds.place - ks.node_sound_defaults(soundtable) - return soundtable -end - -function ks.node_sound_snow_defaults(soundtable) - soundtable = soundtable or {} - soundtable.footstep = soundtable.footstep or ks_sounds.snowynode_sounds.footstep - soundtable.dug = soundtable.dug or ks_sounds.snowynode_sounds.dug - soundtable.dig = soundtable.dig or ks_sounds.snowynode_sounds.dig - soundtable.place = soundtable.place or ks_sounds.snowynode_sounds.place - ks.node_sound_defaults(soundtable) - return soundtable -end - - ---api -function sound_api.node_sound_default(soundtable) - if minetest.get_modpath("default") then - return default.node_sound_defaults(soundtable) - elseif minetest.get_modpath("mcl_sounds") then - return mcl_sounds.node_sound_defaults(soundtable) - elseif minetest.get_modpath("ks_sounds") then - return ks.node_sound_default(soundtable) - elseif minetest.get_modpath("nodes_nature") then - return nodes_nature.node_sound_default(soundtable) - elseif minetest.get_modpath("hades_sounds") then - return hades_sounds.node_sound_defaults(soundtable) - elseif minetest.get_modpath("rp_sounds") then - return rp_sounds.node_sound_defaults(soundtable) - else - return soundtable - end -end - -function sound_api.node_sound_stone_defaults(soundtable) - if minetest.get_modpath("default") then - return default.node_sound_stone_defaults(soundtable) - elseif minetest.get_modpath("mcl_sounds") then - return mcl_sounds.node_sound_stone_defaults(soundtable) - elseif minetest.get_modpath("nodes_nature") then - return nodes_nature.node_sound_stone_defaults(soundtable) - elseif minetest.get_modpath("fl_stone") then - return fl_stone.sounds.stone(soundtable) - elseif minetest.get_modpath("hades_sounds") then - return hades_sounds.node_sound_stone_defaults(soundtable) - elseif minetest.get_modpath("rp_sounds") then - return rp_sounds.node_sound_stone_defaults(soundtable) - else - return soundtable - end -end - -function sound_api.node_sound_dirt_defaults(soundtable) - if minetest.get_modpath("default") then - return default.node_sound_dirt_defaults(soundtable) - elseif minetest.get_modpath("mcl_sounds") then - return mcl_sounds.node_sound_dirt_defaults(soundtable) - elseif minetest.get_modpath("nodes_nature") then - return nodes_nature.node_sound_dirt_defaults(soundtable) - --s/dirt/grass - elseif minetest.get_modpath("fl_topsoil") then - return fl_topsoil.sounds.grass(soundtable) - elseif minetest.get_modpath("hades_sounds") then - return hades_sounds.node_sound_dirt_defaults(soundtable) - elseif minetest.get_modpath("rp_sounds") then - return rp_sounds.node_sound_dirt_defaults(soundtable) - else - return soundtable - end -end - ---return dirt as some games use dirt vs grass -function sound_api.node_sound_grass_defaults(soundtable) - if minetest.get_modpath("hades_sounds") then - return hades_sounds.node_sound_grass_defaults(soundtable) - else - return sound_api.node_sound_dirt_defaults(soundtable) - end -end - -function sound_api.node_sound_sand_defaults(soundtable) - if minetest.get_modpath("default") then - return default.node_sound_sand_defaults(soundtable) - elseif minetest.get_modpath("mcl_sounds") then - return mcl_sounds.node_sound_sand_defaults(soundtable) - elseif minetest.get_modpath("nodes_nature") then - return nodes_nature.node_sound_sand_defaults(soundtable) - elseif minetest.get_modpath("fl_stone") then - return fl_stone.sounds.sand(soundtable) - elseif minetest.get_modpath("hades_sounds") then - return hades_sounds.node_sound_sand_defaults(soundtable) - elseif minetest.get_modpath("rp_sounds") then - return rp_sounds.node_sound_sand_defaults(soundtable) - else - return soundtable - end -end - -function sound_api.node_sound_gravel_defaults(soundtable) - if minetest.get_modpath("default") then - return default.node_sound_gravel_defaults(soundtable) - --s/gravel/sand - elseif minetest.get_modpath("mcl_sounds") then - return mcl_sounds.node_sound_sand_defaults(soundtable) - elseif minetest.get_modpath("nodes_nature") then - return nodes_nature.node_sound_gravel_defaults(soundtable) - elseif minetest.get_modpath("fl_topsoil") then - return fl_topsoil.sounds.gravel(soundtable) - elseif minetest.get_modpath("hades_sounds") then - return hades_sounds.node_sound_gravel_defaults(soundtable) - else - return soundtable - end -end - -function sound_api.node_sound_wood_defaults(soundtable) - if minetest.get_modpath("default") then - return default.node_sound_wood_defaults(soundtable) - elseif minetest.get_modpath("mcl_sounds") then - return mcl_sounds.node_sound_wood_defaults(soundtable) - elseif minetest.get_modpath("ks_sounds") then - return ks.node_sound_wood_default(soundtable) - elseif minetest.get_modpath("nodes_nature") then - return nodes_nature.node_sound_wood_defaults(soundtable) - elseif minetest.get_modpath("fl_trees") then - return fl_trees.sounds.wood(soundtable) - elseif minetest.get_modpath("hades_sounds") then - return hades_sounds.node_sound_wood_defaults(soundtable) - elseif minetest.get_modpath("rp_sounds") then - return rp_sounds.node_sound_wood_defaults(soundtable) - else - return soundtable - end -end - -function sound_api.node_sound_leaves_defaults(soundtable) - if minetest.get_modpath("default") then - return default.node_sound_leaves_defaults(soundtable) - elseif minetest.get_modpath("mcl_sounds") then - return mcl_sounds.node_sound_leaves_defaults(soundtable) - elseif minetest.get_modpath("ks_sounds") then - return ks.node_sound_leaves_default(soundtable) - elseif minetest.get_modpath("nodes_nature") then - return nodes_nature.node_sound_leaves_defaults(soundtable) - elseif minetest.get_modpath("hades_sounds") then - return hades_sounds.node_sound_leaves_defaults(soundtable) - elseif minetest.get_modpath("rp_sounds") then - return rp_sounds.node_sound_leaves_defaults(soundtable) - else - return soundtable - end -end - -function sound_api.node_sound_glass_defaults(soundtable) - if minetest.get_modpath("default") then - return default.node_sound_glass_defaults(soundtable) - elseif minetest.get_modpath("mcl_sounds") then - return mcl_sounds.node_sound_glass_defaults(soundtable) - elseif minetest.get_modpath("nodes_nature") then - return nodes_nature.node_sound_glass_defaults(soundtable) - elseif minetest.get_modpath("hades_sounds") then - return hades_sounds.node_sound_glass_defaults(soundtable) - elseif minetest.get_modpath("rp_sounds") then - return rp_sounds.node_sound_glass_defaults(soundtable) - else - return soundtable - end -end - - -function sound_api.node_sound_ice_defaults(soundtable) - if minetest.get_modpath("default") then - return default.node_sound_ice_defaults(soundtable) - --s/ice/glass - elseif minetest.get_modpath("mcl_sounds") then - return mcl_sounds.node_sound_glass_defaults(soundtable) - --s/ice/glass - elseif minetest.get_modpath("nodes_nature") then - return nodes_nature.node_sound_glass_defaults(soundtable) - --s/ice/glass - elseif minetest.get_modpath("hades_sounds") then - return hades_sounds.node_sound_glass_defaults(soundtable) - else - return soundtable - end -end - -function sound_api.node_sound_metal_defaults(soundtable) - if minetest.get_modpath("default") then - return default.node_sound_metal_defaults(soundtable) - elseif minetest.get_modpath("mcl_sounds") then - return mcl_sounds.node_sound_metal_defaults(soundtable) - elseif minetest.get_modpath("hades_sounds") then - return hades_sounds.node_sound_metal_defaults(soundtable) - else - return soundtable - end -end - -function sound_api.node_sound_water_defaults(soundtable) - if minetest.get_modpath("default") then - return default.node_sound_water_defaults(soundtable) - elseif minetest.get_modpath("mcl_sounds") then - return mcl_sounds.node_sound_water_defaults(soundtable) - elseif minetest.get_modpath("nodes_nature") then - return nodes_nature.node_sound_water_defaults(soundtable) - elseif minetest.get_modpath("hades_sounds") then - return hades_sounds.node_sound_water_defaults(soundtable) - elseif minetest.get_modpath("rp_sounds") then - return rp_sounds.node_sound_water_defaults(soundtable) - else - return soundtable - end -end - -function sound_api.node_sound_lava_defaults(soundtable) - --s/lava/water - if minetest.get_modpath("default") then - return default.node_sound_water_defaults(soundtable) - elseif minetest.get_modpath("mcl_sounds") then - return mcl_sounds.node_sound_lava_defaults(soundtable) - --s/lava/water - elseif minetest.get_modpath("nodes_nature") then - return nodes_nature.node_sound_water_defaults(soundtable) - elseif minetest.get_modpath("hades_sounds") then - return hades_sounds.node_sound_lava_defaults(soundtable) - --s/lava/water - elseif minetest.get_modpath("rp_sounds") then - return rp_sounds.node_sound_water_defaults(soundtable) - else - return soundtable - end -end - -function sound_api.node_sound_snow_defaults(soundtable) - if minetest.get_modpath("default") then - return default.node_sound_snow_defaults(soundtable) - elseif minetest.get_modpath("mcl_sounds") then - return mcl_sounds.node_sound_snow_defaults(soundtable) - elseif minetest.get_modpath("ks_sounds") then - return ks.node_sound_snow_default(soundtable) - elseif minetest.get_modpath("nodes_nature") then - return nodes_nature.node_sound_snow_defaults(soundtable) - elseif minetest.get_modpath("fl_topsoil") then - return fl_topsoil.sounds.snow(soundtable) - elseif minetest.get_modpath("rp_sounds") then - return rp_sounds.node_sound_snow_defaults(soundtable) - else - return soundtable - end -end - -function sound_api.node_sound_wool_defaults(soundtable) - --s/wool/default - if minetest.get_modpath("default") then - return default.node_sound_defaults(soundtable) - elseif minetest.get_modpath("mcl_sounds") then - return mcl_sounds.node_sound_wool_defaults(soundtable) - else - return soundtable - end -end - -return sound_api \ No newline at end of file +return dofile(xcompat.modpath .. "/src/sounds/" .. filename .. ".lua") \ No newline at end of file diff --git a/src/sounds/exile.lua b/src/sounds/exile.lua new file mode 100644 index 0000000..c944ed6 --- /dev/null +++ b/src/sounds/exile.lua @@ -0,0 +1,67 @@ +local sound_api = {} + +function sound_api.node_sound_default(soundtable) + return nodes_nature.node_sound_default(soundtable) +end + +function sound_api.node_sound_stone_defaults(soundtable) + return nodes_nature.node_sound_stone_defaults(soundtable) +end + +function sound_api.node_sound_dirt_defaults(soundtable) + return nodes_nature.node_sound_dirt_defaults(soundtable) +end + +--return dirt as some games use dirt vs grass +function sound_api.node_sound_grass_defaults(soundtable) + return sound_api.node_sound_dirt_defaults(soundtable) +end + +function sound_api.node_sound_sand_defaults(soundtable) + return nodes_nature.node_sound_sand_defaults(soundtable) +end + +function sound_api.node_sound_gravel_defaults(soundtable) + return nodes_nature.node_sound_gravel_defaults(soundtable) +end + +function sound_api.node_sound_wood_defaults(soundtable) + return nodes_nature.node_sound_wood_defaults(soundtable) +end + +function sound_api.node_sound_leaves_defaults(soundtable) + return nodes_nature.node_sound_leaves_defaults(soundtable) +end + +function sound_api.node_sound_glass_defaults(soundtable) + return nodes_nature.node_sound_glass_defaults(soundtable) +end + + +function sound_api.node_sound_ice_defaults(soundtable) + --s/ice/glass + return nodes_nature.node_sound_glass_defaults(soundtable) +end + +function sound_api.node_sound_metal_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_water_defaults(soundtable) + return nodes_nature.node_sound_water_defaults(soundtable) +end + +function sound_api.node_sound_lava_defaults(soundtable) + --s/lava/water + return nodes_nature.node_sound_water_defaults(soundtable) +end + +function sound_api.node_sound_snow_defaults(soundtable) + return nodes_nature.node_sound_snow_defaults(soundtable) +end + +function sound_api.node_sound_wool_defaults(soundtable) + return soundtable +end + +return sound_api \ No newline at end of file diff --git a/src/sounds/farlands_reloaded.lua b/src/sounds/farlands_reloaded.lua new file mode 100644 index 0000000..e5be807 --- /dev/null +++ b/src/sounds/farlands_reloaded.lua @@ -0,0 +1,65 @@ +local sound_api = {} + +function sound_api.node_sound_default(soundtable) + return soundtable +end + +function sound_api.node_sound_stone_defaults(soundtable) + return fl_stone.sounds.stone(soundtable) +end + +function sound_api.node_sound_dirt_defaults(soundtable) + return fl_topsoil.sounds.grass(soundtable) +end + +--return dirt as some games use dirt vs grass +function sound_api.node_sound_grass_defaults(soundtable) + return sound_api.node_sound_dirt_defaults(soundtable) +end + +function sound_api.node_sound_sand_defaults(soundtable) + return fl_stone.sounds.sand(soundtable) +end + +function sound_api.node_sound_gravel_defaults(soundtable) + return fl_topsoil.sounds.gravel(soundtable) +end + +function sound_api.node_sound_wood_defaults(soundtable) + return fl_trees.sounds.wood(soundtable) +end + +function sound_api.node_sound_leaves_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_glass_defaults(soundtable) + return soundtable +end + + +function sound_api.node_sound_ice_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_metal_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_water_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_lava_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_snow_defaults(soundtable) + return fl_topsoil.sounds.snow(soundtable) +end + +function sound_api.node_sound_wool_defaults(soundtable) + return soundtable +end + +return sound_api \ No newline at end of file diff --git a/src/sounds/hades_revisited.lua b/src/sounds/hades_revisited.lua new file mode 100644 index 0000000..a8a2a04 --- /dev/null +++ b/src/sounds/hades_revisited.lua @@ -0,0 +1,66 @@ +local sound_api = {} + +function sound_api.node_sound_default(soundtable) + return hades_sounds.node_sound_defaults(soundtable) +end + +function sound_api.node_sound_stone_defaults(soundtable) + return hades_sounds.node_sound_stone_defaults(soundtable) +end + +function sound_api.node_sound_dirt_defaults(soundtable) + return hades_sounds.node_sound_dirt_defaults(soundtable) +end + +--return dirt as some games use dirt vs grass +function sound_api.node_sound_grass_defaults(soundtable) + return hades_sounds.node_sound_grass_defaults(soundtable) +end + +function sound_api.node_sound_sand_defaults(soundtable) + return hades_sounds.node_sound_sand_defaults(soundtable) +end + +function sound_api.node_sound_gravel_defaults(soundtable) + return hades_sounds.node_sound_gravel_defaults(soundtable) +end + +function sound_api.node_sound_wood_defaults(soundtable) + return hades_sounds.node_sound_wood_defaults(soundtable) +end + +function sound_api.node_sound_leaves_defaults(soundtable) + return hades_sounds.node_sound_leaves_defaults(soundtable) +end + +function sound_api.node_sound_glass_defaults(soundtable) + return hades_sounds.node_sound_glass_defaults(soundtable) +end + + +function sound_api.node_sound_ice_defaults(soundtable) + --s/ice/glass + return hades_sounds.node_sound_glass_defaults(soundtable) +end + +function sound_api.node_sound_metal_defaults(soundtable) + return hades_sounds.node_sound_metal_defaults(soundtable) +end + +function sound_api.node_sound_water_defaults(soundtable) + return hades_sounds.node_sound_water_defaults(soundtable) +end + +function sound_api.node_sound_lava_defaults(soundtable) + return hades_sounds.node_sound_lava_defaults(soundtable) +end + +function sound_api.node_sound_snow_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_wool_defaults(soundtable) + return soundtable +end + +return sound_api \ No newline at end of file diff --git a/src/sounds/ksurvive2.lua b/src/sounds/ksurvive2.lua new file mode 100644 index 0000000..70ae03b --- /dev/null +++ b/src/sounds/ksurvive2.lua @@ -0,0 +1,107 @@ +local sound_api = {} + +--ks_sounds conversion +--currently loggy and bedrock are ignored +local ks = {} + +function ks.node_sound_defaults(soundtable) + soundtable = soundtable or {} + soundtable.footstep = soundtable.footstep or ks_sounds.generalnode_sounds.footstep + soundtable.dug = soundtable.dug or ks_sounds.generalnode_sounds.dug + soundtable.dig = soundtable.dig or ks_sounds.generalnode_sounds.dig + soundtable.place = soundtable.place or ks_sounds.generalnode_sounds.place + return soundtable +end + +function ks.node_sound_wood_defaults(soundtable) + soundtable = soundtable or {} + soundtable.footstep = soundtable.footstep or ks_sounds.woodennode_sounds.footstep + soundtable.dug = soundtable.dug or ks_sounds.woodennode_sounds.dug + soundtable.dig = soundtable.dig or ks_sounds.woodennode_sounds.dig + soundtable.place = soundtable.place or ks_sounds.woodennode_sounds.place + ks.node_sound_defaults(soundtable) + return soundtable +end + +function ks.node_sound_leaves_defaults(soundtable) + soundtable = soundtable or {} + soundtable.footstep = soundtable.footstep or ks_sounds.leafynode_sounds.footstep + soundtable.dug = soundtable.dug or ks_sounds.leafynode_sounds.dug + soundtable.dig = soundtable.dig or ks_sounds.leafynode_sounds.dig + soundtable.place = soundtable.place or ks_sounds.leafynode_sounds.place + ks.node_sound_defaults(soundtable) + return soundtable +end + +function ks.node_sound_snow_defaults(soundtable) + soundtable = soundtable or {} + soundtable.footstep = soundtable.footstep or ks_sounds.snowynode_sounds.footstep + soundtable.dug = soundtable.dug or ks_sounds.snowynode_sounds.dug + soundtable.dig = soundtable.dig or ks_sounds.snowynode_sounds.dig + soundtable.place = soundtable.place or ks_sounds.snowynode_sounds.place + ks.node_sound_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_default(soundtable) + return ks.node_sound_default(soundtable) +end + +function sound_api.node_sound_stone_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_dirt_defaults(soundtable) + return soundtable +end + +--return dirt as some games use dirt vs grass +function sound_api.node_sound_grass_defaults(soundtable) + return sound_api.node_sound_dirt_defaults(soundtable) +end + +function sound_api.node_sound_sand_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_gravel_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_wood_defaults(soundtable) + return ks.node_sound_wood_default(soundtable) +end + +function sound_api.node_sound_leaves_defaults(soundtable) + return ks.node_sound_leaves_default(soundtable) +end + +function sound_api.node_sound_glass_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_ice_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_metal_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_water_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_lava_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_snow_defaults(soundtable) + return ks.node_sound_snow_default(soundtable) +end + +function sound_api.node_sound_wool_defaults(soundtable) + return soundtable +end + +return sound_api \ No newline at end of file diff --git a/src/sounds/mineclonia.lua b/src/sounds/mineclonia.lua new file mode 100644 index 0000000..5de0753 --- /dev/null +++ b/src/sounds/mineclonia.lua @@ -0,0 +1,67 @@ +--note this file handles mineclonia, mineclone2, and its rename voxelibre + +local sound_api = {} + +function sound_api.node_sound_default(soundtable) + return mcl_sounds.node_sound_defaults(soundtable) +end + +function sound_api.node_sound_stone_defaults(soundtable) + return mcl_sounds.node_sound_stone_defaults(soundtable) +end + +function sound_api.node_sound_dirt_defaults(soundtable) + return mcl_sounds.node_sound_dirt_defaults(soundtable) +end + +--return dirt as some games use dirt vs grass +function sound_api.node_sound_grass_defaults(soundtable) + return sound_api.node_sound_dirt_defaults(soundtable) +end + +function sound_api.node_sound_sand_defaults(soundtable) + return mcl_sounds.node_sound_sand_defaults(soundtable) +end + +function sound_api.node_sound_gravel_defaults(soundtable) + return mcl_sounds.node_sound_sand_defaults(soundtable) +end + +function sound_api.node_sound_wood_defaults(soundtable) + return mcl_sounds.node_sound_wood_defaults(soundtable) +end + +function sound_api.node_sound_leaves_defaults(soundtable) + return mcl_sounds.node_sound_leaves_defaults(soundtable) +end + +function sound_api.node_sound_glass_defaults(soundtable) + return mcl_sounds.node_sound_glass_defaults(soundtable) +end + + +function sound_api.node_sound_ice_defaults(soundtable) + return mcl_sounds.node_sound_glass_defaults(soundtable) +end + +function sound_api.node_sound_metal_defaults(soundtable) + return mcl_sounds.node_sound_metal_defaults(soundtable) +end + +function sound_api.node_sound_water_defaults(soundtable) + return mcl_sounds.node_sound_water_defaults(soundtable) +end + +function sound_api.node_sound_lava_defaults(soundtable) + return mcl_sounds.node_sound_lava_defaults(soundtable) +end + +function sound_api.node_sound_snow_defaults(soundtable) + return mcl_sounds.node_sound_snow_defaults(soundtable) +end + +function sound_api.node_sound_wool_defaults(soundtable) + return mcl_sounds.node_sound_wool_defaults(soundtable) +end + +return sound_api \ No newline at end of file diff --git a/src/sounds/minetest.lua b/src/sounds/minetest.lua new file mode 100644 index 0000000..3c2485e --- /dev/null +++ b/src/sounds/minetest.lua @@ -0,0 +1,67 @@ +local sound_api = {} + +function sound_api.node_sound_default(soundtable) + return default.node_sound_defaults(soundtable) +end + +function sound_api.node_sound_stone_defaults(soundtable) + return default.node_sound_stone_defaults(soundtable) +end + +function sound_api.node_sound_dirt_defaults(soundtable) + return default.node_sound_dirt_defaults(soundtable) +end + +--return dirt as some games use dirt vs grass +function sound_api.node_sound_grass_defaults(soundtable) + return sound_api.node_sound_dirt_defaults(soundtable) +end + +function sound_api.node_sound_sand_defaults(soundtable) + return default.node_sound_sand_defaults(soundtable) +end + +function sound_api.node_sound_gravel_defaults(soundtable) + return default.node_sound_gravel_defaults(soundtable) +end + +function sound_api.node_sound_wood_defaults(soundtable) + return default.node_sound_wood_defaults(soundtable) +end + +function sound_api.node_sound_leaves_defaults(soundtable) + return default.node_sound_leaves_defaults(soundtable) +end + +function sound_api.node_sound_glass_defaults(soundtable) + return default.node_sound_glass_defaults(soundtable) +end + + +function sound_api.node_sound_ice_defaults(soundtable) + return default.node_sound_ice_defaults(soundtable) +end + +function sound_api.node_sound_metal_defaults(soundtable) + return default.node_sound_metal_defaults(soundtable) +end + +function sound_api.node_sound_water_defaults(soundtable) + return default.node_sound_water_defaults(soundtable) +end + +function sound_api.node_sound_lava_defaults(soundtable) + --s/lava/water + return default.node_sound_water_defaults(soundtable) +end + +function sound_api.node_sound_snow_defaults(soundtable) + return default.node_sound_snow_defaults(soundtable) +end + +function sound_api.node_sound_wool_defaults(soundtable) + --s/wool/default + return default.node_sound_defaults(soundtable) +end + +return sound_api \ No newline at end of file diff --git a/src/sounds/xcompat_agnostic.lua b/src/sounds/xcompat_agnostic.lua new file mode 100644 index 0000000..2dbdf30 --- /dev/null +++ b/src/sounds/xcompat_agnostic.lua @@ -0,0 +1,63 @@ +local sound_api = {} + +function sound_api.node_sound_default(soundtable) + return soundtable +end + +function sound_api.node_sound_stone_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_dirt_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_grass_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_sand_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_gravel_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_wood_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_leaves_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_glass_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_ice_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_metal_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_water_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_lava_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_snow_defaults(soundtable) + return soundtable +end + +function sound_api.node_sound_wool_defaults(soundtable) + return soundtable +end + +return sound_api \ No newline at end of file