Skip to content

Commit

Permalink
Merge pull request #183 from AresSC2/fix/check-warpgate-structure
Browse files Browse the repository at this point in the history
fix: check for alternative warpgate structure
  • Loading branch information
raspersc2 authored Oct 20, 2024
2 parents c2de5f3 + 0a3c442 commit bd222f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ares/behaviors/macro/tech_up.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ def execute(self, ai: "AresBot", config: dict, mediator: ManagerMediator) -> boo
if tech_progress == 1.0 and not ai.structure_present_or_pending(
researched_from_id
):
# need a gateway, but we have a warpgate already
if (
researched_from_id == UnitID.GATEWAY
and mediator.get_own_structures_dict[UnitID.WARPGATE]
):
return False
logger.info(
f"{ai.time_formatted} Building {researched_from_id} "
f"for {self.desired_tech}"
Expand Down

0 comments on commit bd222f4

Please sign in to comment.