mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Cleanup ClientLauncher structure (#10160)
Remove duplicated variables and unify the startup data into a new (inherited) struct.
This commit is contained in:
parent
2bec83eec0
commit
4fa1e03f68
7 changed files with 197 additions and 200 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue