diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-06-02 13:20:30 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-06-03 22:31:01 +0300 |
commit | 35df1ee2536c6f8370914ecd62abd46501d2f86f (patch) | |
tree | 167f4dd6b24f29a642fd9d1636341a4de039a59f /doc | |
parent | 353f9fd43c94b6d046c077ccfa25320dfe93cfe6 (diff) | |
download | minetest-35df1ee2536c6f8370914ecd62abd46501d2f86f.tar.gz minetest-35df1ee2536c6f8370914ecd62abd46501d2f86f.tar.bz2 minetest-35df1ee2536c6f8370914ecd62abd46501d2f86f.zip |
Implement locked chest; add after_place_node and after_dig_node node callbacks
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 22c1824c0..6de255c0d 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -678,8 +678,10 @@ minetest.register_globalstep(func(dtime)) ^ Called every server step, usually interval of 0.05s minetest.register_on_placenode(func(pos, newnode, placer)) ^ Called when a node has been placed +^ Deprecated: Use on_construct or after_place_node in node definition instead minetest.register_on_dignode(func(pos, oldnode, digger)) ^ Called when a node has been dug. digger can be nil. +^ Deprecated: Use on_destruct or after_dig_node in node definition instead minetest.register_on_punchnode(func(pos, node, puncher)) ^ Called when a node is punched minetest.register_on_generated(func(minp, maxp, blockseed)) @@ -1127,8 +1129,20 @@ Node definition (register_node) on_construct = func(pos), ^ Node constructor; always called after adding node ^ Can set up metadata and stuff like that + ^ default: nil on_destruct = func(pos), ^ Node destructor; always called before removing node + ^ default: nil + + after_place_node = func(pos, placer), + ^ Called after constructing node when node was placed using + minetest.item_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 + ^ default: nil on_punch = func(pos, node, puncher), ^ default: minetest.node_punch |