summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-06-19 22:04:53 +0200
committerLaG1924 <lag1924@gmail.com>2021-06-19 22:13:09 +0200
commitd8710c9c252f49bf442590d47e8b79a9c1231ead (patch)
treec8225953444ead9e4be5a7c586bc21e3c870ab6b /src
parentImplemented RmlFileInterface (diff)
downloadAltCraft-d8710c9c252f49bf442590d47e8b79a9c1231ead.tar
AltCraft-d8710c9c252f49bf442590d47e8b79a9c1231ead.tar.gz
AltCraft-d8710c9c252f49bf442590d47e8b79a9c1231ead.tar.bz2
AltCraft-d8710c9c252f49bf442590d47e8b79a9c1231ead.tar.lz
AltCraft-d8710c9c252f49bf442590d47e8b79a9c1231ead.tar.xz
AltCraft-d8710c9c252f49bf442590d47e8b79a9c1231ead.tar.zst
AltCraft-d8710c9c252f49bf442590d47e8b79a9c1231ead.zip
Diffstat (limited to 'src')
-rw-r--r--src/Plugin.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Plugin.cpp b/src/Plugin.cpp
index 776ba8d..f518957 100644
--- a/src/Plugin.cpp
+++ b/src/Plugin.cpp
@@ -95,6 +95,14 @@ namespace PluginApi {
void Exit() {
PUSH_EVENT("Exit", 0);
}
+
+ void Disconnect() {
+ PUSH_EVENT("Disconnect", std::string("Disconnected by user"));
+ }
+
+ void SetStatePlaying() {
+ SetState(State::Playing);
+ }
}
int LoadFileRequire(lua_State* L) {
@@ -235,6 +243,8 @@ void PluginSystem::Init() {
apiTable["RegisterDimension"] = PluginApi::RegisterDimension;
apiTable["ConnectToServer"] = PluginApi::ConnectToServer;
apiTable["Exit"] = PluginApi::Exit;
+ apiTable["Disconnect"] = PluginApi::Disconnect;
+ apiTable["SetStatePlaying"] = PluginApi::SetStatePlaying;
}
lua_State* PluginSystem::GetLuaState() {