Skip to content

Commit

Permalink
Let build() accept None position again for upgrades or morphs
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnySc2 committed Dec 17, 2024
1 parent c7738c5 commit 9199beb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sc2/unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1267,14 +1267,15 @@ def train(
def build(
self,
unit: UnitTypeId,
position: Point2 | Unit,
position: Point2 | Unit | None = None,
queue: bool = False,
can_afford_check: bool = False,
) -> UnitCommand | bool:
"""Orders unit to build another 'unit' at 'position'.
Usage::
SCV.build(COMMANDCENTER, position)
hatchery.build(UnitTypeId.LAIR)
# Target for refinery, assimilator and extractor needs to be the vespene geysir unit, not its position
SCV.build(REFINERY, target_vespene_geysir)
Expand Down

0 comments on commit 9199beb

Please sign in to comment.