1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Deprecate game.conf name, use title instead (#12030)

This commit is contained in:
rubenwardy 2022-05-21 16:23:30 +01:00 committed by GitHub
parent dc45b85a54
commit 4e9e230e34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 90 additions and 31 deletions

View file

@ -646,6 +646,8 @@ function pkgmgr.install_dir(type, path, basename, targetpath)
else
targetpath = core.get_gamepath() .. DIR_DELIM .. basename
end
else
error("basefolder didn't return a recognised type, this shouldn't happen")
end
-- Copy it
@ -692,7 +694,7 @@ function pkgmgr.preparemodlist(data)
retval[#retval + 1] = {
type = "game",
is_game_content = true,
name = fgettext("$1 mods", gamespec.name),
name = fgettext("$1 mods", gamespec.title),
path = gamespec.path
}
end
@ -873,10 +875,10 @@ end
function pkgmgr.gamelist()
local retval = ""
if #pkgmgr.games > 0 then
retval = retval .. core.formspec_escape(pkgmgr.games[1].name)
retval = retval .. core.formspec_escape(pkgmgr.games[1].title)
for i=2,#pkgmgr.games,1 do
retval = retval .. "," .. core.formspec_escape(pkgmgr.games[i].name)
retval = retval .. "," .. core.formspec_escape(pkgmgr.games[i].title)
end
end
return retval