1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-31 18:31: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

@ -96,7 +96,12 @@ void parseContentInfo(ContentSpec &spec)
Settings conf;
if (!conf_path.empty() && conf.readConfigFile(conf_path.c_str())) {
if (conf.exists("name"))
if (conf.exists("title"))
spec.title = conf.get("title");
else if (spec.type == "game" && conf.exists("name"))
spec.title = conf.get("name");
if (spec.type != "game" && conf.exists("name"))
spec.name = conf.get("name");
if (conf.exists("description"))