Sleep 0.1 s after failing to pathfind to prevent timeouts
This commit is contained in:
@@ -54,15 +54,8 @@ class GatherWartStates:
|
||||
self.state = self.going_to_wart
|
||||
else:
|
||||
print('Cant get to it, blacklisting')
|
||||
time.sleep(0.1)
|
||||
self.bad_warts.append(wart)
|
||||
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_wart
|
||||
|
||||
def going_to_wart(self):
|
||||
|
||||
Reference in New Issue
Block a user