BurnySc2 / python-sc2

A StarCraft II bot api client library for Python 3
MIT License
472 stars 156 forks source link

single unit unload #155

Closed SamOgon-one closed 1 year ago

SamOgon-one commented 1 year ago

client.py is appropiate place for unit unload function, most imports are already here and also many self._execute funcions are here

Note: In unload example https://github.com/BurnySc2/python-sc2/blob/2e5d29671cf6ebcf78b1764c8153916b01c096ca/examples/protoss/single_unit_unload_test.py there is unit index option, which I think is unnecessary. Use scenario: we want to unload specific unit (ex. immortal out of stalkers), we iterate over transporter passengers to identify unit type or tag, so we have unit selected already which we pass to unload function, never store its index.

BurnySc2 commented 1 year ago

there is unit index option, which I think is unnecessary I have updated https://github.com/BurnySc2/python-sc2/pull/108 with a TODO so that the index is no longer required and consider again merging it into develop. This PR is targeting develop branch instead of the branch from the #108 PR, so I'm going to close this PR for now.