Skip to content

Conversation

@BurnySc2
Copy link
Owner

Fixes #223
Related to 1ec2d72

This change fixes find_placement function to work properly with addon_place=True

It can be tested by running the terran/onebase_battlecruiser.py example with the following code change:

if self.can_afford(UnitTypeId.STARPORT):
    position = await self.find_placement(
        UnitTypeId.STARPORT,
        near=cc.position - (3, 0),
        placement_step=1,
        addon_place=True,
    )
    if position is not None:
        await self.build(
            UnitTypeId.STARPORT,
            near=position,
        )

The - (3, 0) forces the function to find a valid position on the left of the main command center.

@BurnySc2 BurnySc2 merged commit 4b15dd9 into develop Jul 20, 2025
60 of 61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Why use AbilityId.TERRANBUILDDROP_SUPPLYDEPOTDROP as the addon_place ability value?

2 participants