mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 01:25:20 +02:00
Cleanup ClientLauncher structure (#10160)
Remove duplicated variables and unify the startup data into a new (inherited) struct.
This commit is contained in:
@@ -23,10 +23,29 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
|
||||
struct SubgameSpec;
|
||||
|
||||
// Information provided from "main"
|
||||
struct GameParams
|
||||
{
|
||||
GameParams() = default;
|
||||
|
||||
u16 socket_port;
|
||||
std::string world_path;
|
||||
SubgameSpec game_spec;
|
||||
bool is_dedicated_server;
|
||||
};
|
||||
|
||||
// Information processed by main menu
|
||||
struct GameStartData : GameParams
|
||||
{
|
||||
GameStartData() = default;
|
||||
|
||||
bool isSinglePlayer() const { return address.empty() && !local_server; }
|
||||
|
||||
std::string name;
|
||||
std::string password;
|
||||
std::string address;
|
||||
bool local_server;
|
||||
|
||||
// "world_path" must be kept in sync!
|
||||
WorldSpec world_spec;
|
||||
};
|
||||
|
Reference in New Issue
Block a user