Only rotate after each slice in VolumeExcavationController if our width is > 1
This commit is contained in:
@ -50,7 +50,7 @@ function VolumeExcavationController:Excavate()
|
||||
self.controller:MoveRelative(self.config.mine_right)
|
||||
self.controller:TurnToDirection(Direction.WEST)
|
||||
|
||||
-- Zig zag mine back to front
|
||||
-- Zig zag mine the full width from back to front
|
||||
-- The direction is important so we can travel to start without colliding with unminded walls
|
||||
local turn_dir = 1
|
||||
for i = 1,self.config.mine_forward do
|
||||
@ -62,9 +62,12 @@ function VolumeExcavationController:Excavate()
|
||||
break
|
||||
end
|
||||
|
||||
self.controller:TurnRelative(turn_dir)
|
||||
self.controller:MoveRelative(1)
|
||||
self.controller:TurnRelative(turn_dir)
|
||||
-- Skip the turning if we're mining in a straight line
|
||||
if self.config.mine_left + self.config.mine_right > 0 then
|
||||
self.controller:TurnRelative(turn_dir)
|
||||
self.controller:MoveRelative(1)
|
||||
self.controller:TurnRelative(turn_dir)
|
||||
end
|
||||
|
||||
turn_dir = -1 * turn_dir
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user