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

summaryrefslogtreecommitdiff
path: root/source/game/StarWorldServer.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-07-23 13:49:34 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-07-23 13:49:34 +1000
commit121d27446b42c960014b2e69999dad73322b05f3 (patch)
tree2a1bbbd55de5628fcd03b64d0c49710e26d64243 /source/game/StarWorldServer.hpp
parentd93b02682994730a2b4d33c6604e0b997b7ee977 (diff)
world.callScriptContext
Diffstat (limited to 'source/game/StarWorldServer.hpp')
-rw-r--r--source/game/StarWorldServer.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/game/StarWorldServer.hpp b/source/game/StarWorldServer.hpp
index 8c240d4..163cc1b 100644
--- a/source/game/StarWorldServer.hpp
+++ b/source/game/StarWorldServer.hpp
@@ -49,6 +49,9 @@ extern EnumMap<WorldServerFidelity> const WorldServerFidelityNames;
class WorldServer : public World {
public:
+ typedef LuaMessageHandlingComponent<LuaUpdatableComponent<LuaWorldComponent<LuaBaseComponent>>> ScriptComponent;
+ typedef shared_ptr<ScriptComponent> ScriptComponentPtr;
+
// Create a new world with the given template, writing new storage file.
WorldServer(WorldTemplatePtr const& worldTemplate, IODevicePtr storage);
// Synonym for WorldServer(make_shared<WorldTemplate>(size), storage);
@@ -193,6 +196,8 @@ public:
// Returns true if a region is fully active without signaling it.
bool regionActive(RectI const& region);
+ ScriptComponentPtr scriptContext(String const& contextName);
+
// Queues a microdungeon for placement
RpcPromise<Vec2I> enqueuePlacement(List<BiomeItemDistribution> distributions, Maybe<DungeonId> id);
@@ -350,8 +355,6 @@ 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;