summaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_env.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-08-11 22:27:54 -0400
committerkwolekr <kwolekr@minetest.net>2015-08-12 23:56:12 -0400
commit2b04ab874d75711bc021a0cd8dc7fca68f4e6929 (patch)
tree04c1e9ad914c8c744cfd1055e2a8f6620d924c8b /src/script/cpp_api/s_env.cpp
parent738fbc66d096575bb9a1694056ce2d627a70c03d (diff)
downloadminetest-2b04ab874d75711bc021a0cd8dc7fca68f4e6929.tar.gz
minetest-2b04ab874d75711bc021a0cd8dc7fca68f4e6929.tar.bz2
minetest-2b04ab874d75711bc021a0cd8dc7fca68f4e6929.zip
SAPI: Track last executed mod and include in error messages
Diffstat (limited to 'src/script/cpp_api/s_env.cpp')
-rw-r--r--src/script/cpp_api/s_env.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/cpp_api/s_env.cpp b/src/script/cpp_api/s_env.cpp
index c171bbf02..9c733773a 100644
--- a/src/script/cpp_api/s_env.cpp
+++ b/src/script/cpp_api/s_env.cpp
@@ -38,7 +38,7 @@ void ScriptApiEnv::environment_OnGenerated(v3s16 minp, v3s16 maxp,
push_v3s16(L, minp);
push_v3s16(L, maxp);
lua_pushnumber(L, blockseed);
- script_run_callbacks(L, 3, RUN_CALLBACKS_MODE_FIRST);
+ runCallbacks(3, RUN_CALLBACKS_MODE_FIRST);
}
void ScriptApiEnv::environment_Step(float dtime)
@@ -52,7 +52,7 @@ void ScriptApiEnv::environment_Step(float dtime)
// Call callbacks
lua_pushnumber(L, dtime);
try {
- script_run_callbacks(L, 1, RUN_CALLBACKS_MODE_FIRST);
+ runCallbacks(1, RUN_CALLBACKS_MODE_FIRST);
} catch (LuaError &e) {
getServer()->setAsyncFatalError(e.what());
}
@@ -73,7 +73,7 @@ void ScriptApiEnv::player_event(ServerActiveObject* player, std::string type)
objectrefGetOrCreate(L, player); // player
lua_pushstring(L,type.c_str()); // event type
try {
- script_run_callbacks(L, 2, RUN_CALLBACKS_MODE_FIRST);
+ runCallbacks(2, RUN_CALLBACKS_MODE_FIRST);
} catch (LuaError &e) {
getServer()->setAsyncFatalError(e.what());
}