diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-22 22:31:04 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-22 22:31:04 +1000 |
commit | cb19eef701b5c9e27d0464795fffcf8a4d795a21 (patch) | |
tree | 5cfbdf49ebd7ac9539891eea850e244887d4c355 /source/client/StarClientApplication.cpp | |
parent | 4fbd67daccfa69df6988bdf17c67ee3d5f3049c5 (diff) |
Add character swapping (no GUI yet)
Diffstat (limited to 'source/client/StarClientApplication.cpp')
-rw-r--r-- | source/client/StarClientApplication.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/client/StarClientApplication.cpp b/source/client/StarClientApplication.cpp index 460c17b..5483591 100644 --- a/source/client/StarClientApplication.cpp +++ b/source/client/StarClientApplication.cpp @@ -506,9 +506,17 @@ void ClientApplication::changeState(MainAppState newState) { m_playerStorage = make_shared<PlayerStorage>(m_root->toStoragePath("player")); m_statistics = make_shared<Statistics>(m_root->toStoragePath("player"), appController()->statisticsService()); m_universeClient = make_shared<UniverseClient>(m_playerStorage, m_statistics); + m_universeClient->setLuaCallbacks("input", LuaBindings::makeInputCallbacks()); m_universeClient->setLuaCallbacks("voice", LuaBindings::makeVoiceCallbacks()); + m_universeClient->playerReloadCallback() = [&]() { + if (auto paneManager = m_mainInterface->paneManager()) { + if (auto inventory = paneManager->registeredPane<InventoryPane>(MainInterfacePanes::Inventory)) + inventory->clearChangedSlots(); + } + }; + m_mainMixer->setUniverseClient(m_universeClient); m_titleScreen = make_shared<TitleScreen>(m_playerStorage, m_mainMixer->mixer()); if (auto renderer = Application::renderer()) |