aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_client.cpp
diff options
context:
space:
mode:
authorElias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com>2020-11-04 16:57:47 +0100
committerGitHub <noreply@github.com>2020-11-04 16:57:47 +0100
commit3e16c3a78fff61c20e63ba730d15e94e3bb877b4 (patch)
treec070350db219f2c4241d22bc31949685c7b42fe9 /src/script/cpp_api/s_client.cpp
parent5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc (diff)
parent6ccb5835ff55d85156be91473c598eca9d6cb9a6 (diff)
downloaddragonfireclient-3e16c3a78fff61c20e63ba730d15e94e3bb877b4.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.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/script/cpp_api/s_client.cpp b/src/script/cpp_api/s_client.cpp
index e6c9eea1a..dd9019d4d 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,8 +187,7 @@ 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
@@ -238,11 +237,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))