diff --git a/pokemongo_bot/cell_workers/move_to_fort.py b/pokemongo_bot/cell_workers/move_to_fort.py index e4b4187d20..7dcd0977b1 100644 --- a/pokemongo_bot/cell_workers/move_to_fort.py +++ b/pokemongo_bot/cell_workers/move_to_fort.py @@ -13,17 +13,18 @@ class MoveToFort(BaseTask): def initialize(self): self.lure_distance = 0 - self.lure_attraction = True #self.config.get("lure_attraction", True) - self.lure_max_distance = 2000 #self.config.get("lure_max_distance", 2000) + self.lure_attraction = self.config.get("lure_attraction", True) + self.lure_max_distance = self.config.get("lure_max_distance", 2000) + self.ignore_item_count = self.config.get("ignore_item_count", False) def should_run(self): has_space_for_loot = self.bot.has_space_for_loot() if not has_space_for_loot: self.emit_event( 'inventory_full', - formatted="Not moving to any forts as there aren't enough space. You might want to change your config to recycle more items if this message appears consistently." + formatted="Inventory is full. You might want to change your config to recycle more items if this message appears consistently." ) - return has_space_for_loot or self.bot.softban + return has_space_for_loot or self.ignore_item_count or self.bot.softban def is_attracted(self): return (self.lure_distance > 0) diff --git a/pokemongo_bot/cell_workers/spin_fort.py b/pokemongo_bot/cell_workers/spin_fort.py index 2b1c862fc9..445946e7e1 100644 --- a/pokemongo_bot/cell_workers/spin_fort.py +++ b/pokemongo_bot/cell_workers/spin_fort.py @@ -15,14 +15,16 @@ class SpinFort(BaseTask): SUPPORTED_TASK_API_VERSION = 1 + 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(): self.emit_event( 'inventory_full', - formatted="Not moving to any forts as there aren't enough space. You might want to change your config to recycle more items if this message appears consistently." + formatted="Inventory is full. You might want to change your config to recycle more items if this message appears consistently." ) - return False - return True + return self.ignore_item_count or self.bot.has_space_for_loot() def work(self): fort = self.get_fort_in_range()