This is a bug that only appears with flood fills of large machines,
which is why it has only just shown up. The problem occurs because a
RegionTree iterates over its subregions recursively, whereas the entire
tree should be iterated over in increasing y before x.
Should be produced in the order (1, 2, 3) but are actually produced in
the order (1, 3, 2) causing SC&MP to ignore region transmitted after 2.
This commit fixes the problem by including an additional call to
sorted in compress_flood_fill_regions. Ideally some better iteration
over the tree could be implemented. This needs further thought so I
suggest this fix for now.
Thanks to @lplana for bringing this bug to my attention.
This is a bug that only appears with flood fills of large machines, which is why it has only just shown up. The problem occurs because a RegionTree iterates over its subregions recursively, whereas the entire tree should be iterated over in increasing y before x.
For example, the selected regions:
Should be produced in the order (1, 2, 3) but are actually produced in the order (1, 3, 2) causing SC&MP to ignore region transmitted after 2.
This commit fixes the problem by including an additional call to
sorted
incompress_flood_fill_regions
. Ideally some better iteration over the tree could be implemented. This needs further thought so I suggest this fix for now.Thanks to @lplana for bringing this bug to my attention.