Batch crop farming and stop on unreachable barrels
This commit is contained in:
@@ -44,6 +44,20 @@ class GroundSupplyTests(unittest.TestCase):
|
||||
self.assertEqual(state.target_items, (items.CHEST_ID,))
|
||||
self.assertIs(state.state.__func__, state.find_ground_items.__func__)
|
||||
|
||||
def test_unreachable_barrel_ends_supply_task_without_trying_more(self):
|
||||
class FakeWorld:
|
||||
@staticmethod
|
||||
def path_to_place_faked(_start, _barrel):
|
||||
return None
|
||||
|
||||
state = GrabSuppliesStates(Munch(
|
||||
pos=(0.5, 64.0, 0.5), world=FakeWorld(), chunks=Munch()))
|
||||
state.barrel = (10, 64, 10)
|
||||
state.path_to_barrel()
|
||||
|
||||
self.assertIs(state.state.__func__, state.cleanup.__func__)
|
||||
self.assertEqual(state.bad_barrels, [(10, 64, 10)])
|
||||
|
||||
def test_job_walks_to_and_picks_up_dropped_supply_before_barrels(self):
|
||||
axe_id = next(iter(items.AXE_IDS))
|
||||
dropped_axe = Munch(
|
||||
|
||||
Reference in New Issue
Block a user