Grab useful supplies off the ground

This commit is contained in:
Tanner
2026-11-05 23:22:29 +00:00
parent 5262cbd411
commit ef7bf1d7da
5 changed files with 282 additions and 15 deletions
+4 -1
View File
@@ -9,11 +9,13 @@ from mosfet.job import JobStates
class TestCropCaching(unittest.TestCase):
def test_crop_farm_runs_silent_cache_machine_and_keeps_seeds(self):
old_wanted = items.WANTED_ITEMS
supply_state = object()
crop_state = object()
cache_state = Munch(silent=False)
sleep_state = Munch(silent=False)
eat_state = object()
jobs = JobStates.__new__(JobStates)
jobs.grab_supplies_states = supply_state
jobs.gather_crop_states = crop_state
jobs.cache_items_states = cache_state
jobs.sleep_with_bed_states = sleep_state
@@ -22,7 +24,8 @@ class TestCropCaching(unittest.TestCase):
try:
machines = JobStates.farm_crop(jobs)
self.assertEqual(
machines, [crop_state, sleep_state, eat_state, cache_state])
machines, [supply_state, crop_state, sleep_state,
eat_state, cache_state])
self.assertTrue(cache_state.silent)
self.assertTrue(sleep_state.silent)
self.assertTrue({