diff options
author | Elias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com> | 2020-11-04 16:44:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 16:44:42 +0100 |
commit | 5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc (patch) | |
tree | c980d614fec4a5495798be3e79e033229062c3cd /src/script/cpp_api/s_client.cpp | |
parent | 28f6a79706b088c37268a59d90878220dc4ef9c7 (diff) | |
parent | 3af10766fd2b58b068e970266724d7eb10e9316b (diff) | |
download | dragonfireclient-5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc.tar.xz |
Merge branch 'master' into master
Diffstat (limited to 'src/script/cpp_api/s_client.cpp')
-rw-r--r-- | src/script/cpp_api/s_client.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/script/cpp_api/s_client.cpp b/src/script/cpp_api/s_client.cpp index dd9019d4d..e6c9eea1a 100644 --- a/src/script/cpp_api/s_client.cpp +++ b/src/script/cpp_api/s_client.cpp @@ -120,13 +120,13 @@ void ScriptApiClient::environment_step(float dtime) try { runCallbacks(1, RUN_CALLBACKS_MODE_FIRST); } catch (LuaError &e) { - getClient()->setFatalError(std::string("Client environment_step: ") + e.what() + "\n" - + script_get_backtrace(L)); + getClient()->setFatalError(std::string("Client environment_step: ") + + e.what() + "\n" + script_get_backtrace(L)); } } -void ScriptApiClient::on_formspec_input(const std::string &formname, - const StringMap &fields) +void ScriptApiClient::on_formspec_input( + const std::string &formname, const StringMap &fields) { SCRIPTAPI_PRECHECKHEADER @@ -187,7 +187,8 @@ bool ScriptApiClient::on_punchnode(v3s16 p, MapNode node) return readParam<bool>(L, -1); } -bool ScriptApiClient::on_placenode(const PointedThing &pointed, const ItemDefinition &item) +bool ScriptApiClient::on_placenode( + const PointedThing &pointed, const ItemDefinition &item) { SCRIPTAPI_PRECHECKHEADER @@ -237,11 +238,11 @@ bool ScriptApiClient::on_inventory_open(Inventory *inventory) void ScriptApiClient::open_enderchest() { SCRIPTAPI_PRECHECKHEADER - + PUSH_ERROR_HANDLER(L); int error_handler = lua_gettop(L) - 1; lua_insert(L, error_handler); - + lua_getglobal(L, "core"); lua_getfield(L, -1, "open_enderchest"); if (lua_isfunction(L, -1)) |