summaryrefslogtreecommitdiffstats
path: root/src/Plugin.cpp
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-06-22 01:40:04 +0200
committerLaG1924 <lag1924@gmail.com>2021-06-22 02:20:33 +0200
commit0d2b4783824730ba2208f5caaef27c5c61a56fa5 (patch)
tree3c2e085706f3824aa34d2dce5747c9c86a79723a /src/Plugin.cpp
parentAdded Settings UI (diff)
downloadAltCraft-0d2b4783824730ba2208f5caaef27c5c61a56fa5.tar
AltCraft-0d2b4783824730ba2208f5caaef27c5c61a56fa5.tar.gz
AltCraft-0d2b4783824730ba2208f5caaef27c5c61a56fa5.tar.bz2
AltCraft-0d2b4783824730ba2208f5caaef27c5c61a56fa5.tar.lz
AltCraft-0d2b4783824730ba2208f5caaef27c5c61a56fa5.tar.xz
AltCraft-0d2b4783824730ba2208f5caaef27c5c61a56fa5.tar.zst
AltCraft-0d2b4783824730ba2208f5caaef27c5c61a56fa5.zip
Diffstat (limited to 'src/Plugin.cpp')
-rw-r--r--src/Plugin.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Plugin.cpp b/src/Plugin.cpp
index e3188e6..5134aa6 100644
--- a/src/Plugin.cpp
+++ b/src/Plugin.cpp
@@ -237,6 +237,11 @@ void PluginSystem::Init() {
"name", &Dimension::name,
"skylight", &Dimension::skylight);
+ lua.new_usertype<LoopExecutionTimeController>("LoopExecutionTimeController",
+ "GetIterations", &LoopExecutionTimeController::GetIterations,
+ "GetDeltaS", &LoopExecutionTimeController::GetDeltaS,
+ "GetRealDeltaS", &LoopExecutionTimeController::GetRealDeltaS);
+
sol::table apiTable = lua["AC"].get_or_create<sol::table>();
sol::table apiSettings = lua["AC"]["Settings"].get_or_create<sol::table>();
@@ -262,6 +267,7 @@ void PluginSystem::Init() {
apiSettings["ReadDouble"] = Settings::ReadDouble;
apiSettings["WriteDouble"] = Settings::WriteDouble;
apiTable["SettingsUpdate"] = PluginApi::SettingsUpdate;
+ apiTable["GetTime"] = GetTime;
}
lua_State* PluginSystem::GetLuaState() {