mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-10-17 22:55:22 +02:00
add fifo_queue.add_list() and use it to eliminate an inner loop
This commit is contained in:
@@ -85,9 +85,10 @@ function mesecon.mvps_get_stack(pos, dir, maximum, all_pull_sticky)
|
||||
if minetest.registered_nodes[nn.name]
|
||||
and minetest.registered_nodes[nn.name].mvps_sticky then
|
||||
local connected = minetest.registered_nodes[nn.name].mvps_sticky(np, nn)
|
||||
for _, cp in ipairs(connected) do
|
||||
frontiers:add_list(connected)
|
||||
--[[for _, cp in ipairs(connected) do
|
||||
frontiers:add(cp)
|
||||
end
|
||||
end]]
|
||||
end
|
||||
|
||||
frontiers:add(vector.add(np, dir))
|
||||
|
Reference in New Issue
Block a user