Closed merfolk closed 4 years ago
This is how we can change class names without breaking any old bots.
A deprecated class looks like this in PyCharm:
And results in warnings like this in console:
C:\Dev\sc2\sharpy-sc2\dummies\terran\bio.py:201: DeprecationWarning: 'RequiredUnitExists' is deprecated, use 'UnitExists' instead worker_scout = Step(None, WorkerScout(), skip_until=RequiredUnitExists(UnitTypeId.SUPPLYDEPOT, 1)) C:\Dev\sc2\sharpy-sc2\sharpy\plans\build_order.py:68: DeprecationWarning: 'RequiredEnemyUnitExists' is deprecated, use 'EnemyUnitExists' instead require_list.append(RequiredEnemyUnitExists(unit_type, count))
To test this PR, these dummies are a good option since they use both of the renamed classes:
py run_custom.py -p1 adept -p2 bio
This is how we can change class names without breaking any old bots.
A deprecated class looks like this in PyCharm:![kuva](https://user-images.githubusercontent.com/1806447/79068546-6c493400-7cd0-11ea-8b92-ac69c47a0f88.png)
And results in warnings like this in console:
To test this PR, these dummies are a good option since they use both of the renamed classes: