From ccb2362b81edd7d50905a4eb0b87448d5f53269f Mon Sep 17 00:00:00 2001 From: The4codeblocks <72419529+The4codeblocks@users.noreply.github.com> Date: Sat, 21 Feb 2026 06:09:25 -0500 Subject: [PATCH 1/6] miscopy fix --- src/sounds.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sounds.lua b/src/sounds.lua index a871259..52c52ad 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 fallback 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") From 398b5380b6738f465958402ce13d59336e347b29 Mon Sep 17 00:00:00 2001 From: The4codeblocks <72419529+The4codeblocks@users.noreply.github.com> Date: Sat, 21 Feb 2026 06:10:25 -0500 Subject: [PATCH 2/6] xcompat_agnostic ~= minetest --- src/player.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/player.lua b/src/player.lua index fa03f41..2bc4be3 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 fallback 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") From 9364c18d86adf25c98bc46753dd5982c92e72584 Mon Sep 17 00:00:00 2001 From: The4codeblocks <72419529+The4codeblocks@users.noreply.github.com> Date: Sat, 21 Feb 2026 06:10:48 -0500 Subject: [PATCH 3/6] nevermind, precedent --- src/sounds.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sounds.lua b/src/sounds.lua index 52c52ad..0b206d2 100644 --- a/src/sounds.lua +++ b/src/sounds.lua @@ -1,6 +1,6 @@ local filename = xcompat.gameid ---if we dont have a sounds file for the game, use fallback +--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 From b0909139d3f62012f13e7848fa375c69b8d3afca Mon Sep 17 00:00:00 2001 From: The4codeblocks <72419529+The4codeblocks@users.noreply.github.com> Date: Sat, 21 Feb 2026 06:11:00 -0500 Subject: [PATCH 4/6] nevermind, precedent (again) --- src/player.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/player.lua b/src/player.lua index 2bc4be3..a6f594d 100644 --- a/src/player.lua +++ b/src/player.lua @@ -1,6 +1,6 @@ local filename = xcompat.gameid ---if we dont have a player file for the game, use fallback +--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 From 1176d59effbc2f897acdda47c6d734fd63a5b6e9 Mon Sep 17 00:00:00 2001 From: The4codeblocks <72419529+The4codeblocks@users.noreply.github.com> Date: Sat, 21 Feb 2026 06:12:08 -0500 Subject: [PATCH 5/6] x --- src/textures.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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") From 1fe34620df4ca3f98b0923544b43f070d6ad58d0 Mon Sep 17 00:00:00 2001 From: The4codeblocks <72419529+The4codeblocks@users.noreply.github.com> Date: Sat, 21 Feb 2026 06:14:31 -0500 Subject: [PATCH 6/6] reduce redundancy --- src/gameid.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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