Merge branch 'master' into doc-refactoring

This commit is contained in:
AFCMS 2021-03-31 16:15:34 +02:00
commit 626990adeb
3 changed files with 717 additions and 217 deletions

View File

@ -74,6 +74,7 @@ function mesecon.is_mvps_unsticky(node, pulldir, stack, stackid)
end end
-- Functions to be called on mvps movement -- Functions to be called on mvps movement
-- See also the callback
function mesecon.register_on_mvps_move(callback) function mesecon.register_on_mvps_move(callback)
mesecon.on_mvps_move[#mesecon.on_mvps_move+1] = callback mesecon.on_mvps_move[#mesecon.on_mvps_move+1] = callback
end end
@ -405,17 +406,20 @@ mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_brown")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_light_blue") mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_light_blue")
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_pink") mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_pink")
-- Includes node heat when moving them
mesecon.register_on_mvps_move(mesecon.move_hot_nodes) mesecon.register_on_mvps_move(mesecon.move_hot_nodes)
-- Check for falling after moving node
mesecon.register_on_mvps_move(function(moved_nodes) mesecon.register_on_mvps_move(function(moved_nodes)
for i = 1, #moved_nodes do for i = 1, #moved_nodes do
local moved_node = moved_nodes[i] local moved_node = moved_nodes[i]
-- Check for falling after moving node
mesecon.on_placenode(moved_node.pos, moved_node.node) mesecon.on_placenode(moved_node.pos, moved_node.node)
minetest.after(0, function() minetest.after(0, function()
minetest.check_for_falling(moved_node.oldpos) minetest.check_for_falling(moved_node.oldpos)
minetest.check_for_falling(moved_node.pos) minetest.check_for_falling(moved_node.pos)
end) end)
-- Callback for on_mvps_move stored in nodedef
local node_def = minetest.registered_nodes[moved_node.node.name] 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 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, node_def.mesecon.on_mvps_move(moved_node.pos, moved_node.node,

View File

@ -1,3 +1,5 @@
mcl_ocean = {}
-- Prismarine (includes sea lantern) -- Prismarine (includes sea lantern)
dofile(minetest.get_modpath(minetest.get_current_modname()).."/prismarine.lua") dofile(minetest.get_modpath(minetest.get_current_modname()).."/prismarine.lua")

File diff suppressed because it is too large Load Diff