Pause for 0.5 s when finding a bad crop

master
Tanner Collin 3 years ago
parent 2a3db71a7b
commit 1466f448ee
  1. 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…
Cancel
Save