refactor sounds like textures/materials (#24)

This commit is contained in:
wsor4035 2024-05-26 14:00:33 -04:00 committed by GitHub
parent 788217bb8e
commit b9b6d49619
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 532 additions and 294 deletions

View File

@ -12,6 +12,13 @@ for _, texture in ipairs(textures_list) do
textures[gameid] = dofile(xcompat.modpath.."/src/textures/"..texture) textures[gameid] = dofile(xcompat.modpath.."/src/textures/"..texture)
end 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", { minetest.register_chatcommand("xcompat_test_materials", {
description = "Test materials", description = "Test materials",
privs = {server=true}, privs = {server=true},
@ -49,3 +56,21 @@ minetest.register_chatcommand("xcompat_test_textures", {
minetest.chat_send_player(name, "Textures test complete") minetest.chat_send_player(name, "Textures test complete")
end 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
})

View File

@ -1,297 +1,8 @@
local sound_api = {} local filename = xcompat.gameid
--convert some games for api usage --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
--ks_sounds conversion filename = "xcompat_agnostic"
--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 end
function ks.node_sound_wood_defaults(soundtable) return dofile(xcompat.modpath .. "/src/sounds/" .. filename .. ".lua")
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

67
src/sounds/exile.lua Normal file
View File

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

View File

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

View File

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

107
src/sounds/ksurvive2.lua Normal file
View File

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

67
src/sounds/mineclonia.lua Normal file
View File

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

67
src/sounds/minetest.lua Normal file
View File

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

View File

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