Skip to content

Commit 1114452

Browse files
committed
Fix ramp finding
1 parent ea4dead commit 1114452

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

examples/terran/ramp_wall.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ def raise_and_lower_depots():
3636
for depo in self.structures(UnitTypeId.SUPPLYDEPOT).ready:
3737
for unit in self.enemy_units:
3838
if unit.distance_to(depo) < 15:
39-
break
39+
return
4040
else:
4141
depo(AbilityId.MORPH_SUPPLYDEPOT_LOWER)
4242
# Lower depos when no enemies are nearby
4343
for depo in self.structures(UnitTypeId.SUPPLYDEPOTLOWERED).ready:
4444
for unit in self.enemy_units:
4545
if unit.distance_to(depo) < 10:
4646
depo(AbilityId.MORPH_SUPPLYDEPOT_RAISE)
47-
break
47+
return
4848

4949
raise_and_lower_depots()
5050

sc2/game_info.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ def paint(pt: Point2) -> None:
321321
point: Point2 = Point2((px, py))
322322
remaining.discard(point)
323323
paint(point)
324+
queue.append(point)
324325
current_group.add(point)
325326
if len(current_group) >= minimum_points_per_group:
326327
yield frozenset(current_group)

sc2/versions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
VERSIONS: list[dict[str, int | str]] = [
24
{
35
"base-version": 52910,

0 commit comments

Comments
 (0)