simple-shooter-game/mods/misc/xcompat/src/gameid.lua
IonicCheese 17eeae8937
Massive update (#6)
* Refactor some of the code, multiple bug fixes

* Fix something stupid

* More bug fixes

* LOTS OF STUFF

* Make the sniper alot stronger and other changes

* Prevent Players from respawning in the middle of a match

* Fix stupid mistake

* Small update

* More updates

* Remove minimap access.. and downgrade the sniper class
2025-12-10 23:17:42 -04:00

33 lines
No EOL
838 B
Lua

local game_alias = {
mineclone2 = "mineclonia",
}
local game_modnames = {
mineclonia = "mcl_core",
farlands_reloaded = "fl_core",
minetest = "default",
hades = "hades_core",
exile = "exile_env_sounds",
ksurvive2 = "ks_metals",
}
local gameid = "xcompat_unknown_gameid"
if type(minetest.get_game_info) == "function" then
gameid = minetest.get_game_info().id
else
for game, modname in pairs(game_modnames) do
if minetest.get_modpath(modname) then
gameid = game
break
end
end
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