Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace building scv #89

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ares/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class UnitTreeQueryType(str, Enum):
"""Sets"""
ADD_ONS: dict[UnitID, UnitID] = {
UnitID.BARRACKSREACTOR: UnitID.BARRACKS,
UnitID.FACTORYTECHREACTOR: UnitID.FACTORY,
UnitID.FACTORYREACTOR: UnitID.FACTORY,
UnitID.STARPORTREACTOR: UnitID.STARPORT,
UnitID.BARRACKSTECHLAB: UnitID.BARRACKS,
UnitID.FACTORYTECHLAB: UnitID.FACTORY,
Expand Down
4 changes: 2 additions & 2 deletions src/ares/managers/building_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ async def update(self, iteration: int) -> None:
-------

"""
await self._handle_construction_orders()
self._handle_construction_orders()

# check if a worker has the Building task but isn't being told to build anything
for worker in self.manager_mediator.get_units_from_role(
Expand All @@ -160,7 +160,7 @@ async def update(self, iteration: int) -> None:
tag=worker.tag, role=UnitRole.GATHERING
)

async def _handle_construction_orders(self) -> None:
def _handle_construction_orders(self) -> None:
"""Construct tracked buildings.

Go through the building tracker and control workers. This is to avoid the
Expand Down
2 changes: 1 addition & 1 deletion src/ares/managers/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ async def on_unit_destroyed(self, unit_tag: int) -> None:
# remove dead townhalls and workers
self.resource_manager.on_unit_destroyed(unit_tag)
self.placement_manager.on_building_destroyed(unit_tag)
self.building_manager.remove_unit(unit_tag)
# self.building_manager.remove_unit(unit_tag)

def on_game_end(self, result: Union[Result, str]) -> None:
"""Store data from the completed game.
Expand Down
Loading