Summary: If you assign a mining zone on the side of a cliff with one click or one click and drag, that is too tall for the hearthlings to reach and at least 2 blocks deep then the hearthlings can’t reach every block in the first layer and won’t move on to mine blocks in the next layer that they can reach.
Steps to reproduce:
- With only one click or click and drag, assign a mining zone on the side of a cliff that is taller than 5 (the hearthling reach) and at least 2 blocks deep.
- As they have mined out as much as they can reach on the first layer they will stop.
- Use the debug tools to see that only the blocks that they can’t reach in the first layer have the red adjacency blocks.
- Do the same thing again but assign the mining zone as two steps. One for the bottom 5 layers and one for the layers above.
- Now they can mine out the bottom 5 layers.
Expected Results: How you assign the mining zone shouldn’t matter.
Actual Results: I does.
When mining_zone_component.lua is running _update_destination() to look for blocks to mine it takes _self.sv.region:get() and then in _add_destination_blocks it loops through each_cube() and looks for exposed cubes. From what I can tell though, the cubes don’t follow the shape of the terrain but are the cubes that the user dragged out to assign the mining zone.
This causes problems in _add_side_facing_blocks. It looks for the first slice of blocks on each side and ignores blocks that are further in.
The result is that if the hearthlings can’t reach every block in a slice then they won’t move on to mine blocks in the next slice that they can reach.
There seems to be a similar problem with _add_top_facing_blocks but it should be solved at the same time, unless the fix is done inside _add_side_facing_blocks.
I’m not sure if it should be solved by comparing the zone to the terrain at some good point or if it should be handled some other way for better performance.
In the left image I assigned the mining zone with one click and drag. In the right I did the inner layer as one and the rest as one.
Version Number and Mods in use: Latest version and only the defaults and the debug tools.