Aim crop farmers at targets with pitch limit
This commit is contained in:
@@ -120,6 +120,23 @@ class GatherWartTests(unittest.TestCase):
|
||||
state.wait_place()
|
||||
self.assertIs(state.state.__func__, state.cleanup.__func__)
|
||||
|
||||
def test_navigation_looks_at_the_wart_target(self):
|
||||
position = (5, 64, 8)
|
||||
|
||||
class FakeWorld:
|
||||
@staticmethod
|
||||
def path_to_place(_start, _target):
|
||||
return [(1, 64, 1), position]
|
||||
|
||||
g = Munch(world=FakeWorld(), pos=(1, 64, 1), path=[], look_at=None)
|
||||
state = GatherWartStates(g)
|
||||
state.wart = position
|
||||
|
||||
state.nav_to_wart()
|
||||
|
||||
self.assertEqual(g.look_at, position)
|
||||
self.assertEqual(g.path[-1], position)
|
||||
|
||||
def test_unreachable_wart_is_blacklisted_without_undefined_variable(self):
|
||||
position = (5, 64, 8)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user