mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Use default_game when making a new world using --world without --gameid
This commit is contained in:
parent
eafde7186f
commit
2e61008fd9
1 changed files with 3 additions and 1 deletions
|
@ -1279,7 +1279,9 @@ int main(int argc, char *argv[])
|
||||||
menudata.selected_world = -1;
|
menudata.selected_world = -1;
|
||||||
// If a world was commanded, append and select it
|
// If a world was commanded, append and select it
|
||||||
if(commanded_world != ""){
|
if(commanded_world != ""){
|
||||||
std::string gameid = getWorldGameId(commanded_world);
|
std::string gameid = getWorldGameId(commanded_world, true);
|
||||||
|
if(gameid == "")
|
||||||
|
gameid = g_settings->get("default_game");
|
||||||
WorldSpec spec(commanded_world, "[commanded world]", gameid);
|
WorldSpec spec(commanded_world, "[commanded world]", gameid);
|
||||||
worldspecs.push_back(spec);
|
worldspecs.push_back(spec);
|
||||||
menudata.worlds.push_back(narrow_to_wide(spec.name)
|
menudata.worlds.push_back(narrow_to_wide(spec.name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue