summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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() {