From ebfa15a95443511ae4842c7277dc5658716edc36 Mon Sep 17 00:00:00 2001 From: Reynald Pader Date: Thu, 1 Feb 2018 14:56:33 +0800 Subject: [PATCH] Fix enum name used Some enum names have been changed from the new id generation script --- sc2/bot_ai.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sc2/bot_ai.py b/sc2/bot_ai.py index 19045be78..c85f41356 100644 --- a/sc2/bot_ai.py +++ b/sc2/bot_ai.py @@ -148,7 +148,7 @@ async def distribute_workers(self): for x in range(0, deficit): if worker_pool: w = worker_pool.pop() - if len(w.orders) == 1 and w.orders[0].ability.id in [AbilityId.HARVESTRETURN]: + if len(w.orders) == 1 and w.orders[0].ability.id in [AbilityId.HARVEST_RETURN]: await self.do(w.move(g)) await self.do(w.return_resource(queue=True)) else: @@ -163,7 +163,7 @@ async def distribute_workers(self): if worker_pool: w = worker_pool.pop() mf = self.state.mineral_field.closest_to(townhall) - if len(w.orders) == 1 and w.orders[0].ability.id in [AbilityId.HARVESTRETURN]: + if len(w.orders) == 1 and w.orders[0].ability.id in [AbilityId.HARVEST_RETURN]: await self.do(w.move(townhall)) await self.do(w.return_resource(queue=True)) await self.do(w.gather(mf, queue=True))