diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-06-05 23:51:37 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-06-05 23:51:37 +0300 |
commit | 3a0562bebcb91d05fceb5a1f9ded539f77a625e4 (patch) | |
tree | 8b788689029fbeaf7880b628186b77c5f667845f /doc/lua_api.txt | |
parent | c3658e7c797cbf5b9d04a6d950505d37dcdd422b (diff) | |
download | minetest-3a0562bebcb91d05fceb5a1f9ded539f77a625e4.tar.gz minetest-3a0562bebcb91d05fceb5a1f9ded539f77a625e4.tar.bz2 minetest-3a0562bebcb91d05fceb5a1f9ded539f77a625e4.zip |
Add after_destruct and cache the existence of on_construct, on_destruct and after_destruct for quick skipping when a node does not have them
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r-- | doc/lua_api.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 5e0f2f118..e6e24b90a 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1150,15 +1150,18 @@ Node definition (register_node) on_destruct = func(pos), ^ Node destructor; always called before removing node ^ default: nil + after_destruct = func(pos, oldnode), + ^ Node destructor; always called after removing node + ^ default: nil after_place_node = func(pos, placer), ^ Called after constructing node when node was placed using - minetest.item_place_node + minetest.item_place_node / minetest.env:place_node ^ default: nil after_dig_node = func(pos, oldnode, oldmetadata, digger), ^ oldmetadata is in table format ^ Called after destructing node when node was dug using - minetest.node_dig + minetest.node_dig / minetest.env:dig_node ^ default: nil can_dig = function(pos,player) ^ returns true if node can be dug, or false if not |