Pause for 0.5 s when finding a bad crop

This commit is contained in:
Tanner Collin 2021-03-04 21:17:35 +00:00
parent 2a3db71a7b
commit 1466f448ee
1 changed files with 8 additions and 0 deletions

View File

@ -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):