Skip to content

Commit

Permalink
fix incubator (#4803)
Browse files Browse the repository at this point in the history
  • Loading branch information
rawgni authored and mjmadsen committed Aug 27, 2016
1 parent 9b28b44 commit f0623bd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pokemongo_bot/cell_workers/incubate_eggs.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,16 @@ def _apply_incubators(self):
for egg in self.eggs:
if egg["used"] or egg["km"] == -1:
continue


km = int(egg["km"])

# test if the incubator is of type breakable
if incubator.get('uses_remaining') is not None:
if egg["km"] not in self.breakable_incubator:
if km not in self.breakable_incubator:
continue

# test if the incubator is of type infinite
if incubator.get('uses_remaining') is None:
if egg["km"] not in self.infinite_incubator:
else:
if km not in self.infinite_incubator:
continue

self.emit_event(
Expand Down

0 comments on commit f0623bd

Please sign in to comment.