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

summaryrefslogtreecommitdiff
path: root/source/game/StarWorldServer.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-07-23 13:11:22 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-07-23 13:11:22 +1000
commitd93b02682994730a2b4d33c6604e0b997b7ee977 (patch)
tree0595583ef8806f58d83f95b0770ca1ef9b6571e8 /source/game/StarWorldServer.hpp
parent5fa97741e509f813d28db90e7bce1aac45e22829 (diff)
Add WorldServer script contexts
Diffstat (limited to 'source/game/StarWorldServer.hpp')
-rw-r--r--source/game/StarWorldServer.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/game/StarWorldServer.hpp b/source/game/StarWorldServer.hpp
index b8f3965..8c240d4 100644
--- a/source/game/StarWorldServer.hpp
+++ b/source/game/StarWorldServer.hpp
@@ -12,6 +12,7 @@
#include "StarInterpolationTracker.hpp"
#include "StarWorldStructure.hpp"
#include "StarLuaRoot.hpp"
+#include "StarLuaComponents.hpp"
#include "StarWorldRenderData.hpp"
#include "StarWarping.hpp"
#include "StarRpcThreadPromise.hpp"
@@ -31,6 +32,7 @@ STAR_CLASS(DungeonDefinition);
STAR_CLASS(WorldServer);
STAR_CLASS(TileEntity);
STAR_CLASS(UniverseSettings);
+STAR_CLASS(UniverseServer);
STAR_EXCEPTION(WorldServerException, StarException);
@@ -66,6 +68,8 @@ public:
void setReferenceClock(ClockPtr clock);
+ void initLua(UniverseServer* universe);
+
// Give this world a central structure. If there is a previous central
// structure it is removed first. Returns the structure with transformed
// coordinates.
@@ -346,6 +350,10 @@ private:
WireProcessorPtr m_wireProcessor;
LuaRootPtr m_luaRoot;
+ typedef LuaMessageHandlingComponent<LuaUpdatableComponent<LuaWorldComponent<LuaBaseComponent>>> ScriptComponent;
+ typedef shared_ptr<ScriptComponent> ScriptComponentPtr;
+ StringMap<ScriptComponentPtr> m_scriptContexts;
+
WorldGeometry m_geometry;
uint64_t m_currentStep;
mutable CellularLightIntensityCalculator m_lightIntensityCalculator;