Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game
diff options
context:
space:
mode:
Diffstat (limited to 'source/game')
-rw-r--r--source/game/StarUniverseClient.cpp9
-rw-r--r--source/game/StarUniverseClient.hpp3
2 files changed, 5 insertions, 7 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>();
diff --git a/source/game/StarUniverseClient.hpp b/source/game/StarUniverseClient.hpp
index b951e25..b770b07 100644
--- a/source/game/StarUniverseClient.hpp
+++ b/source/game/StarUniverseClient.hpp
@@ -87,7 +87,8 @@ public:
uint16_t maxPlayers();
void setLuaCallbacks(String const& groupName, LuaCallbacks const& callbacks);
- void startLua();
+ void restartLua();
+ void startLuaScripts();
void stopLua();
LuaRootPtr luaRoot();