fix last typos
@@ -346,7 +346,7 @@ class BotAI:
if len(worker_pool) > len(deficit_mining_places):
all_minerals_near_base = [
mineral
- for mineral in self.mineral_fields
+ for mineral in self.state.mineral_field
if any(mineral.distance_to(base) <= 8 for base in self.townhalls.ready)
]
# distribute every worker in the pool
@@ -376,7 +376,7 @@ class BotAI:
mineral for mineral in self.state.mineral_field if mineral.distance_to(current_place) <= 8
]
target_mineral = max(local_minerals, key=lambda mineral: mineral.mineral_contents)
- self.actions.append(worker.gather(target_mineral))
+ actions.append(worker.gather(target_mineral))
# more workers to distribute than free mining spots
# send to closest if worker is doing nothing
elif worker.is_idle and all_minerals_near_base:
