Implement item cachine for 26.3
This commit is contained in:
+12
-1
@@ -269,16 +269,27 @@ class JobStates(LegacyJobStates):
|
||||
def __init__(self, global_state):
|
||||
self.g = global_state
|
||||
self.gather_crop_states = gather_crop.GatherCropStates(global_state)
|
||||
self.cache_items_states = cache_items.CacheItemsStates(global_state)
|
||||
self.state = self.idle
|
||||
|
||||
def farm_crop(self):
|
||||
return [self.gather_crop_states]
|
||||
self.cache_items_states.silent = True
|
||||
items.set_wanted({
|
||||
items.CARROT_ID,
|
||||
items.POTATO_ID,
|
||||
items.WHEAT_SEEDS_ID,
|
||||
items.BEETROOT_SEEDS_ID,
|
||||
})
|
||||
return [self.gather_crop_states, self.cache_items_states]
|
||||
|
||||
def stop(self):
|
||||
if self.g.get('breaking'):
|
||||
self.g.game.cancel_break()
|
||||
if self.g.get('window'):
|
||||
self.g.game.close_window()
|
||||
self.g.path = []
|
||||
self.g.look_at = None
|
||||
self.gather_crop_states.state = self.gather_crop_states.idle
|
||||
self.cache_items_states.state = self.cache_items_states.idle
|
||||
self.gather_crop_states.active_section_anchor = None
|
||||
self.state = self.idle
|
||||
|
||||
Reference in New Issue
Block a user