Skip to content

Commit

Permalink
Don't show Inventory full event if we set "ignore_item_count" (#3440)
Browse files Browse the repository at this point in the history
  • Loading branch information
achretien authored and TheSavior committed Aug 10, 2016
1 parent edeb2c2 commit f823d77
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pokemongo_bot/cell_workers/move_to_fort.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def initialize(self):

def should_run(self):
has_space_for_loot = self.bot.has_space_for_loot()
if not has_space_for_loot:
if not has_space_for_loot and not self.ignore_item_count:
self.emit_event(
'inventory_full',
formatted="Inventory is full. You might want to change your config to recycle more items if this message appears consistently."
Expand Down
11 changes: 6 additions & 5 deletions pokemongo_bot/cell_workers/spin_fort.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def initialize(self):
self.ignore_item_count = self.config.get("ignore_item_count", False)

def should_run(self):
if not self.bot.has_space_for_loot():
if not self.bot.has_space_for_loot() and not self.ignore_item_count:
self.emit_event(
'inventory_full',
formatted="Inventory is full. You might want to change your config to recycle more items if this message appears consistently."
Expand Down Expand Up @@ -106,10 +106,11 @@ def work(self):
data={'pokestop': fort_name, 'minutes_left': minutes_left}
)
elif spin_result == 4:
self.emit_event(
'inventory_full',
formatted="Inventory is full!"
)
if not self.ignore_item_count:
self.emit_event(
'inventory_full',
formatted="Inventory is full!"
)
else:
self.emit_event(
'unknown_spin_result',
Expand Down

0 comments on commit f823d77

Please sign in to comment.