mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
World selection box in main menu (and random fixing)
This commit is contained in:
parent
bcaab74f1f
commit
d1d83d7e7f
7 changed files with 291 additions and 102 deletions
|
@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#include <string>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
struct SubgameSpec
|
||||
{
|
||||
|
@ -47,7 +48,32 @@ SubgameSpec findSubgame(const std::string &id);
|
|||
|
||||
std::set<std::string> getAvailableGameIds();
|
||||
|
||||
std::string getWorldGameId(const std::string &world_path);
|
||||
std::string getWorldGameId(const std::string &world_path,
|
||||
bool can_be_legacy=false);
|
||||
|
||||
struct WorldSpec
|
||||
{
|
||||
std::string path;
|
||||
std::string name;
|
||||
std::string gameid;
|
||||
|
||||
WorldSpec(
|
||||
const std::string &path_="",
|
||||
const std::string &name_="",
|
||||
const std::string &gameid_=""
|
||||
):
|
||||
path(path_),
|
||||
name(name_),
|
||||
gameid(gameid_)
|
||||
{}
|
||||
|
||||
bool isValid() const
|
||||
{
|
||||
return (name != "" && path != "" && gameid != "");
|
||||
}
|
||||
};
|
||||
|
||||
std::vector<WorldSpec> getAvailableWorlds();
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue