diff options
author | rubenwardy <rw@rubenwardy.com> | 2022-05-21 16:23:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-21 16:23:30 +0100 |
commit | 4e9e230e34912d08ec0f0fc01d14ef80654c7cac (patch) | |
tree | ae06c4fc9971808dd0a87d07aba702d8561b05ef /src/content/content.cpp | |
parent | dc45b85a543b4c8ad72f69a554ecfe7f0a60c533 (diff) | |
download | minetest-4e9e230e34912d08ec0f0fc01d14ef80654c7cac.tar.gz minetest-4e9e230e34912d08ec0f0fc01d14ef80654c7cac.tar.bz2 minetest-4e9e230e34912d08ec0f0fc01d14ef80654c7cac.zip |
Deprecate game.conf name, use title instead (#12030)
Diffstat (limited to 'src/content/content.cpp')
-rw-r--r-- | src/content/content.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/content/content.cpp b/src/content/content.cpp index 66ef83d42..e576943ff 100644 --- a/src/content/content.cpp +++ b/src/content/content.cpp @@ -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")) |