mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Rename MINETEST_SUBGAME_PATH
to MINETEST_GAME_PATH
(#14351)
This commit is contained in:
parent
e2ccd14c05
commit
7901087466
3 changed files with 16 additions and 3 deletions
|
@ -77,8 +77,21 @@ struct GameFindPath
|
|||
|
||||
std::string getSubgamePathEnv()
|
||||
{
|
||||
static bool has_warned = false;
|
||||
char *subgame_path = getenv("MINETEST_SUBGAME_PATH");
|
||||
return subgame_path ? std::string(subgame_path) : "";
|
||||
if (subgame_path && !has_warned) {
|
||||
warningstream << "MINETEST_SUBGAME_PATH is deprecated, use MINETEST_GAME_PATH instead."
|
||||
<< std::endl;
|
||||
has_warned = true;
|
||||
}
|
||||
|
||||
char *game_path = getenv("MINETEST_GAME_PATH");
|
||||
|
||||
if (game_path)
|
||||
return std::string(game_path);
|
||||
else if (subgame_path)
|
||||
return std::string(subgame_path);
|
||||
return "";
|
||||
}
|
||||
|
||||
SubgameSpec findSubgame(const std::string &id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue