aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_node.cpp
diff options
context:
space:
mode:
authorproller <proller@github.com>2013-07-27 22:34:30 +0400
committerproller <proller@github.com>2013-07-27 23:21:48 +0400
commit3aedfac9685c2d9ae8bac5a5b7e72e527f22c08d (patch)
treed1f9067040acb0b5dad42a2ae8935b91124a36d3 /src/script/cpp_api/s_node.cpp
parente65d8ad6553d7ae0acf63b43e9818059088a00b6 (diff)
downloadminetest-3aedfac9685c2d9ae8bac5a5b7e72e527f22c08d.tar.xz
Weather support
Diffstat (limited to 'src/script/cpp_api/s_node.cpp')
-rw-r--r--src/script/cpp_api/s_node.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_node.cpp b/src/script/cpp_api/s_node.cpp
index 49a825cac..d0b0583c0 100644
--- a/src/script/cpp_api/s_node.cpp
+++ b/src/script/cpp_api/s_node.cpp
@@ -233,3 +233,20 @@ void ScriptApiNode::node_on_receive_fields(v3s16 p,
scriptError("error: %s", lua_tostring(L, -1));
}
+void ScriptApiNode::node_falling_update(v3s16 p)
+{
+ SCRIPTAPI_PRECHECKHEADER
+ lua_getglobal(L, "nodeupdate");
+ push_v3s16(L, p);
+ if(lua_pcall(L, 1, 0, 0))
+ scriptError("error: %s", lua_tostring(L, -1));
+}
+
+void ScriptApiNode::node_falling_update_single(v3s16 p)
+{
+ SCRIPTAPI_PRECHECKHEADER
+ lua_getglobal(L, "nodeupdate_single");
+ push_v3s16(L, p);
+ if(lua_pcall(L, 1, 0, 0))
+ scriptError("error: %s", lua_tostring(L, -1));
+}