Aim crop farmers at targets with pitch limit

This commit is contained in:
Tanner
2026-11-07 17:35:32 +00:00
parent 95f4aa4821
commit a019b54396
6 changed files with 89 additions and 37 deletions
+17
View File
@@ -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)