//floodfill: remove debug

This commit is contained in:
Starbeamrainbowlabs 2021-08-07 02:31:21 +01:00
parent d1b0866af2
commit fc2444c5cd
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -27,16 +27,12 @@ function worldeditadditions.floodfill(start_pos, radius, replace_node)
end end
local count = 0 local count = 0
local remaining_nodes = wea.Queue.new() local remaining_nodes = wea.Queue.new() remaining_nodes:enqueue(start_pos_index)
print("DEBUG enqueue start_pos_index", start_pos_index)
print("DEBUG enqueued id", remaining_nodes:enqueue(start_pos_index))
-- Do the floodfill -- Do the floodfill
while remaining_nodes:is_empty() == false do while remaining_nodes:is_empty() == false do
local cur = remaining_nodes:dequeue() local cur = remaining_nodes:dequeue()
print("DEBUG cur", cur)
-- Replace this node -- Replace this node
data[cur] = replace_id data[cur] = replace_id
count = count + 1 count = count + 1