1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +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

@ -29,7 +29,7 @@ class Settings;
struct SubgameSpec
{
std::string id;
std::string name;
std::string title;
std::string author;
int release;
std::string path;
@ -41,20 +41,24 @@ struct SubgameSpec
std::unordered_map<std::string, std::string> addon_mods_paths;
std::string menuicon_path;
// For logging purposes
std::vector<const char *> deprecation_msgs;
SubgameSpec(const std::string &id = "", const std::string &path = "",
const std::string &gamemods_path = "",
const std::unordered_map<std::string, std::string> &addon_mods_paths = {},
const std::string &name = "",
const std::string &title = "",
const std::string &menuicon_path = "",
const std::string &author = "", int release = 0) :
id(id),
name(name), author(author), release(release), path(path),
title(title), author(author), release(release), path(path),
gamemods_path(gamemods_path), addon_mods_paths(addon_mods_paths),
menuicon_path(menuicon_path)
{
}
bool isValid() const { return (!id.empty() && !path.empty()); }
void checkAndLog() const;
};
SubgameSpec findSubgame(const std::string &id);