diff options
author | DS <vorunbekannt75@web.de> | 2017-10-18 21:40:25 +0200 |
---|---|---|
committer | Vitaliy <silverunicorn2011@yandex.ru> | 2017-10-18 22:40:25 +0300 |
commit | 1b10610f9221f2df1afb0dba18a88c1ac324ab60 (patch) | |
tree | 8efa52eacd367c2d1b66c6ce2e7e37a5f32872fa | |
parent | 4f400f3fae1955a5a54e710167a91a2cba48d280 (diff) | |
download | mesecons-1b10610f9221f2df1afb0dba18a88c1ac324ab60.tar mesecons-1b10610f9221f2df1afb0dba18a88c1ac324ab60.tar.gz mesecons-1b10610f9221f2df1afb0dba18a88c1ac324ab60.tar.bz2 mesecons-1b10610f9221f2df1afb0dba18a88c1ac324ab60.tar.xz mesecons-1b10610f9221f2df1afb0dba18a88c1ac324ab60.zip |
Check for falling nodes on MVPS move (#371)
-rw-r--r-- | mesecons_mvps/init.lua | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mesecons_mvps/init.lua b/mesecons_mvps/init.lua index 45f5ccf..014ff19 100644 --- a/mesecons_mvps/init.lua +++ b/mesecons_mvps/init.lua @@ -205,12 +205,6 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, all_pull_sti return true, nodes, oldstack end -mesecon.register_on_mvps_move(function(moved_nodes) - for _, n in ipairs(moved_nodes) do - mesecon.on_placenode(n.pos, n.node) - end -end) - function mesecon.mvps_move_objects(pos, dir, nodestack) local objects_to_move = {} local dir_k @@ -273,6 +267,11 @@ mesecon.register_on_mvps_move(mesecon.move_hot_nodes) mesecon.register_on_mvps_move(function(moved_nodes) for i = 1, #moved_nodes do local moved_node = moved_nodes[i] + mesecon.on_placenode(moved_node.pos, moved_node.node) + minetest.after(0, function() + minetest.check_for_falling(moved_node.oldpos) + minetest.check_for_falling(moved_node.pos) + end) local node_def = minetest.registered_nodes[moved_node.node.name] if node_def and node_def.mesecon and node_def.mesecon.on_mvps_move then node_def.mesecon.on_mvps_move(moved_node.pos, moved_node.node, |