diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2025-01-25 10:42:15 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2025-01-25 10:42:15 +1100 |
commit | a7aa6679397563b144c016ef8712bf438cfa63df (patch) | |
tree | 8c102cbb52ed32a19e6a9005cf1752c9572fdbfd /source/game/StarUniverseClient.cpp | |
parent | 93b78ec8e80b404346ee3b4781f98a4d9342863f (diff) |
Fix callbacks not being updated properly in chat scripts
Diffstat (limited to 'source/game/StarUniverseClient.cpp')
-rw-r--r-- | source/game/StarUniverseClient.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/game/StarUniverseClient.cpp b/source/game/StarUniverseClient.cpp index 75d1dbf..12d72ee 100644 --- a/source/game/StarUniverseClient.cpp +++ b/source/game/StarUniverseClient.cpp @@ -23,8 +23,6 @@ #include "StarQuestManager.hpp" #include "StarPlayerUniverseMap.hpp" #include "StarWorldTemplate.hpp" -#include "StarCelestialLuaBindings.hpp" -#include "StarTeamClientLuaBindings.hpp" namespace Star { @@ -497,12 +495,11 @@ void UniverseClient::setLuaCallbacks(String const& groupName, LuaCallbacks const m_luaRoot->addCallbacks(groupName, callbacks); } -void UniverseClient::startLua() { +void UniverseClient::restartLua() { m_luaRoot->restart(); - setLuaCallbacks("celestial", LuaBindings::makeCelestialCallbacks(this)); - setLuaCallbacks("team", LuaBindings::makeTeamClientCallbacks(m_teamClient.get())); - setLuaCallbacks("world", LuaBindings::makeWorldCallbacks(m_worldClient.get())); +} +void UniverseClient::startLuaScripts() { auto assets = Root::singleton().assets(); for (auto& p : assets->json("/client.config:universeScriptContexts").toObject()) { auto scriptComponent = make_shared<ScriptComponent>(); |