diff --git a/src/gameid.lua b/src/gameid.lua index 88ef0a1..fef2693 100644 --- a/src/gameid.lua +++ b/src/gameid.lua @@ -3,9 +3,9 @@ local game_alias = { } local game_modnames = { + minetest = "default", mineclonia = "mcl_core", farlands_reloaded = "fl_core", - minetest = "default", hades = "hades_core", exile = "exile_env_sounds", ksurvive2 = "ks_metals", @@ -16,6 +16,8 @@ local gameid = "xcompat_unknown_gameid" if type(minetest.get_game_info) == "function" then gameid = minetest.get_game_info().id + --while minetest game derviates are not supported, we can still try to detect them + if minetest.get_modpath("default") then gameid = "minetest" end else for game, modname in pairs(game_modnames) do if minetest.get_modpath(modname) then @@ -28,7 +30,5 @@ end --for games that are similar/derviatives of other games if game_alias[gameid] then gameid = game_alias[gameid] end ---while minetest game derviates are not supported, we can still try to detect them -if minetest.get_modpath("default") then gameid = "minetest" end return gameid diff --git a/src/player.lua b/src/player.lua index fa03f41..a6f594d 100644 --- a/src/player.lua +++ b/src/player.lua @@ -1,8 +1,8 @@ local filename = xcompat.gameid ---if we dont have a player file for the game, use minetest +--if we dont have a player file for the game, use xcompat_agnostic if not xcompat.utilities.file_exists(xcompat.modpath .. "/src/player/" .. filename .. ".lua") then filename = "xcompat_agnostic" end -return dofile(xcompat.modpath .. "/src/player/" .. filename .. ".lua") \ No newline at end of file +return dofile(xcompat.modpath .. "/src/player/" .. filename .. ".lua") diff --git a/src/sounds.lua b/src/sounds.lua index a871259..0b206d2 100644 --- a/src/sounds.lua +++ b/src/sounds.lua @@ -1,8 +1,8 @@ local filename = xcompat.gameid ---if we dont have a materials file for the game, use minetest +--if we dont have a sounds file for the game, use xcompat_agnostic if not xcompat.utilities.file_exists(xcompat.modpath .. "/src/sounds/" .. filename .. ".lua") then filename = "xcompat_agnostic" end -return dofile(xcompat.modpath .. "/src/sounds/" .. filename .. ".lua") \ No newline at end of file +return dofile(xcompat.modpath .. "/src/sounds/" .. filename .. ".lua") diff --git a/src/textures.lua b/src/textures.lua index ceb7736..4f930b2 100644 --- a/src/textures.lua +++ b/src/textures.lua @@ -1,8 +1,8 @@ local filename = xcompat.gameid ---if we dont have a materials file for the game, use minetest +--if we dont have a materials file for the game, use xcompat_agnostic if not xcompat.utilities.file_exists(xcompat.modpath .. "/src/textures/" .. filename .. ".lua") then filename = "xcompat_agnostic" end -return dofile(xcompat.modpath .. "/src/textures/" .. filename .. ".lua") \ No newline at end of file +return dofile(xcompat.modpath .. "/src/textures/" .. filename .. ".lua")