diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-23 13:11:22 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-23 13:11:22 +1000 |
commit | d93b02682994730a2b4d33c6604e0b997b7ee977 (patch) | |
tree | 0595583ef8806f58d83f95b0770ca1ef9b6571e8 /source/game/StarUniverseServer.cpp | |
parent | 5fa97741e509f813d28db90e7bce1aac45e22829 (diff) |
Add WorldServer script contexts
Diffstat (limited to 'source/game/StarUniverseServer.cpp')
-rw-r--r-- | source/game/StarUniverseServer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/game/StarUniverseServer.cpp b/source/game/StarUniverseServer.cpp index dcf76e3..51f4cec 100644 --- a/source/game/StarUniverseServer.cpp +++ b/source/game/StarUniverseServer.cpp @@ -18,6 +18,7 @@ #include "StarSky.hpp" #include "StarAiDatabase.hpp" #include "StarBiomeDatabase.hpp" +#include "StarUniverseServerLuaBindings.hpp" namespace Star { @@ -1946,6 +1947,8 @@ Maybe<WorkerPoolPromise<WorldServerThreadPtr>> UniverseServer::shipWorldPromise( else shipWorld->setOrbitalSky(celestialSkyParameters(clientContext->shipCoordinate())); + shipWorld->initLua(this); + auto shipWorldThread = make_shared<WorldServerThread>(shipWorld, ClientShipWorldId(clientShipWorldId)); shipWorldThread->setPause(m_pause); clientContext->updateShipChunks(shipWorldThread->readChunks()); @@ -1986,6 +1989,8 @@ Maybe<WorkerPoolPromise<WorldServerThreadPtr>> UniverseServer::celestialWorldPro worldServer->setUniverseSettings(m_universeSettings); worldServer->setReferenceClock(universeClock); + worldServer->initLua(this); + auto worldThread = make_shared<WorldServerThread>(worldServer, celestialWorldId); worldThread->setPause(m_pause); worldThread->start(); @@ -2105,6 +2110,8 @@ Maybe<WorkerPoolPromise<WorldServerThreadPtr>> UniverseServer::instanceWorldProm } } + worldServer->initLua(this); + auto worldThread = make_shared<WorldServerThread>(worldServer, instanceWorldId); worldThread->setPause(m_pause); worldThread->start(); |