Pause for 0.5 s when finding a bad crop
This commit is contained in:
parent
2a3db71a7b
commit
1466f448ee
8
jobs.py
8
jobs.py
|
@ -166,6 +166,14 @@ class GatherCropStates:
|
|||
self.state = self.going_to_crop
|
||||
else:
|
||||
self.bad_crops.append(self.crop)
|
||||
self.wait_time = 0.5
|
||||
self.state = self.wait_to_restart
|
||||
|
||||
def wait_to_restart(self):
|
||||
# prevent timeouts
|
||||
if self.wait_time > 0:
|
||||
self.wait_time -= utils.TICK
|
||||
else:
|
||||
self.state = self.find_new_crop
|
||||
|
||||
def going_to_crop(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user