Return support jobs to work boundary
This commit is contained in:
1 parent
72a03220c3
commit
9513dd3671
4 files changed
+193
-147
No files matched your search
@@ -14,8 +14,9 @@ from mosfet import path
|
||||
from mosfet.info import blocks
|
||||
from mosfet.info import items
|
||||
from mosfet.info import mobs
|
||||
from mosfet.jobs.work_boundary import WorkBoundaryReturnMixin
|
||||
|
||||
class GrabSuppliesStates:
|
||||
class GrabSuppliesStates(WorkBoundaryReturnMixin):
|
||||
DEFAULT_SUPPLIES = {
|
||||
tuple(items.BED_IDS): (1, 1),
|
||||
(items.CHEST_ID,): (1, 1),
|
||||
@@ -29,6 +30,7 @@ class GrabSuppliesStates:
|
||||
return None
|
||||
|
||||
def init(self):
|
||||
self._capture_work_boundary()
|
||||
print('Started grab supplies states')
|
||||
self.checked_supply_chests = set()
|
||||
|
||||
@@ -568,6 +570,8 @@ class GrabSuppliesStates:
|
||||
self.state = self.choose_supply_chest
|
||||
|
||||
def cleanup(self):
|
||||
if self._maybe_return_to_work_boundary(self.cleanup):
|
||||
return
|
||||
self.state = self.done
|
||||
|
||||
def done(self):
|
||||
@@ -598,7 +602,9 @@ class GrabSuppliesStates:
|
||||
self.failed_drop_slots = set()
|
||||
self.pending_drop_slot = None
|
||||
self.protected_ground_items_logged = set()
|
||||
self.work_policies = []
|
||||
|
||||
def run(self):
|
||||
self._track_work_boundary_position()
|
||||
self._refresh_useless_chests()
|
||||
self.state()
|
||||
Reference in new issue
Block a user