Remove game_ui from Client class

This commit is contained in:
cx384 2024-12-20 15:03:45 +01:00 committed by GitHub
parent 10f1e142f6
commit b172e67295
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1 additions and 8 deletions

@ -14,7 +14,6 @@
#include "network/networkpacket.h" #include "network/networkpacket.h"
#include "threading/mutex_auto_lock.h" #include "threading/mutex_auto_lock.h"
#include "client/clientevent.h" #include "client/clientevent.h"
#include "client/gameui.h"
#include "client/renderingengine.h" #include "client/renderingengine.h"
#include "client/sound.h" #include "client/sound.h"
#include "client/texturepaths.h" #include "client/texturepaths.h"
@ -94,7 +93,6 @@ Client::Client(
ISoundManager *sound, ISoundManager *sound,
MtEventManager *event, MtEventManager *event,
RenderingEngine *rendering_engine, RenderingEngine *rendering_engine,
GameUI *game_ui,
ELoginRegister allow_login_or_register ELoginRegister allow_login_or_register
): ):
m_tsrc(tsrc), m_tsrc(tsrc),
@ -117,7 +115,6 @@ Client::Client(
m_chosen_auth_mech(AUTH_MECHANISM_NONE), m_chosen_auth_mech(AUTH_MECHANISM_NONE),
m_media_downloader(new ClientMediaDownloader()), m_media_downloader(new ClientMediaDownloader()),
m_state(LC_Created), m_state(LC_Created),
m_game_ui(game_ui),
m_modchannel_mgr(new ModChannelMgr()) m_modchannel_mgr(new ModChannelMgr())
{ {
// Add local player // Add local player

@ -99,7 +99,6 @@ private:
}; };
class ClientScripting; class ClientScripting;
class GameUI;
class Client : public con::PeerHandler, public InventoryManager, public IGameDef class Client : public con::PeerHandler, public InventoryManager, public IGameDef
{ {
@ -119,7 +118,6 @@ public:
ISoundManager *sound, ISoundManager *sound,
MtEventManager *event, MtEventManager *event,
RenderingEngine *rendering_engine, RenderingEngine *rendering_engine,
GameUI *game_ui,
ELoginRegister allow_login_or_register ELoginRegister allow_login_or_register
); );
@ -572,8 +570,6 @@ private:
// own state // own state
LocalClientState m_state; LocalClientState m_state;
GameUI *m_game_ui;
// Used for saving server map to disk client-side // Used for saving server map to disk client-side
MapDatabase *m_localdb = nullptr; MapDatabase *m_localdb = nullptr;
IntervalLimiter m_localdb_save_interval; IntervalLimiter m_localdb_save_interval;

@ -1614,7 +1614,7 @@ bool Game::connectToServer(const GameStartData &start_data,
start_data.password, start_data.password,
*draw_control, texture_src, shader_src, *draw_control, texture_src, shader_src,
itemdef_manager, nodedef_manager, sound_manager.get(), eventmgr, itemdef_manager, nodedef_manager, sound_manager.get(), eventmgr,
m_rendering_engine, m_game_ui.get(), m_rendering_engine,
start_data.allow_login_or_register); start_data.allow_login_or_register);
} catch (const BaseException &e) { } catch (const BaseException &e) {
*error_message = fmtgettext("Error creating client: %s", e.what()); *error_message = fmtgettext("Error creating client: %s", e.what());