Skip to content

Commit

Permalink
Only go through CompleteTutorial once at launch (#4296)
Browse files Browse the repository at this point in the history
  • Loading branch information
net8q authored and solderzzc committed Aug 19, 2016
1 parent 7327827 commit e602b32
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pokemongo_bot/cell_workers/complete_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@ def initialize(self):
self.api = self.bot.api
self.nickname = self.config.get('nickname','')
self.team = self.config.get('team',0)
self.may_run = True

def should_run(self):
return True
return self.may_run

def work(self):

if not self.should_run():
return WorkerResult.SUCCESS

# Only execute the worker once to avoid error loop
self.may_run = False

if self._check_tutorial_state():
return WorkerResult.SUCCESS
else:
Expand Down

0 comments on commit e602b32

Please sign in to comment.