add player compatibility api (#41)

This commit is contained in:
wsor4035
2024-09-08 18:01:52 -04:00
committed by GitHub
parent 931a16803e
commit b18dc7ba14
10 changed files with 210 additions and 12 deletions

8
src/player.lua Normal file
View File

@ -0,0 +1,8 @@
local filename = xcompat.gameid
--if we dont have a player file for the game, use minetest
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")