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

summaryrefslogtreecommitdiff
path: root/source/game/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'source/game/scripting')
-rw-r--r--source/game/scripting/StarWorldLuaBindings.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/game/scripting/StarWorldLuaBindings.cpp b/source/game/scripting/StarWorldLuaBindings.cpp
index 08a7a43..624660f 100644
--- a/source/game/scripting/StarWorldLuaBindings.cpp
+++ b/source/game/scripting/StarWorldLuaBindings.cpp
@@ -356,6 +356,8 @@ namespace LuaBindings {
});
if (auto clientWorld = as<WorldClient>(world)) {
+ callbacks.registerCallback("inWorld", [clientWorld]() { return clientWorld->inWorld(); });
+ callbacks.registerCallback("mainPlayer", [clientWorld]() { return clientWorld->clientState().playerId(); });
callbacks.registerCallback("isClient", []() { return true; });
callbacks.registerCallback("isServer", []() { return false; });
callbacks.registerCallbackWithSignature<RectI>("clientWindow", bind(ClientWorldCallbacks::clientWindow, clientWorld));