Skip to content

Commit 4b15dd9

Browse files
authored
Merge pull request #225 from BurnySc2/fix-find-placement-function
Fix find_placement function using addon_place=True
2 parents dd593e7 + 988c864 commit 4b15dd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sc2/bot_ai.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ async def find_placement(
695695
building = self.game_data.units[building.value].creation_ability.id
696696

697697
if await self.can_place_single(building, near) and (
698-
not addon_place or await self.can_place_single(UnitTypeId.SUPPLYDEPOT, near.offset((2.5, -0.5)))
698+
not addon_place or await self.can_place_single(AbilityId.TERRANBUILD_SUPPLYDEPOT, near.offset((2.5, -0.5)))
699699
):
700700
return near
701701

@@ -719,7 +719,7 @@ async def find_placement(
719719
if addon_place:
720720
# Filter remaining positions if addon can be placed
721721
res = await self.client._query_building_placement_fast(
722-
AbilityId.TERRANBUILDDROP_SUPPLYDEPOTDROP,
722+
AbilityId.TERRANBUILD_SUPPLYDEPOT,
723723
[p.offset((2.5, -0.5)) for p in possible],
724724
)
725725
possible = [p for r, p in zip(res, possible) if r]

0 commit comments

Comments
 (0)